Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Database and Reporting (http://www.xtremevbtalk.com/-net-database-and-reporting/)
-   -   MSSQL - Insert > 1000 rows (http://www.xtremevbtalk.com/-net-database-and-reporting/327637-mssql-insert-1000-rows.html)

JustinCase2 05-29-2015 02:09 AM

MSSQL - Insert > 1000 rows
When inserting rows to MSSQL, it has a limit of 1000 rows per statement. I have an import function that opens a text file With a special format, reads lots of logs from this, manipulates the data, and then inserts it into the database. I end up With about 1,500,000 records. Is there a way around the "only 1000 per statement" issue? It totally ruins the programs performance.
I have been looking for suggestions, but they all involve the import wizards etc., and i HAVE TO do it programatically.
I would prefer to bulk insert ALL the rows at once, but at the very least 10000-100000 per statement...

I have come across the bulk copy operation, but i am not sure how to use this when i do not have a matching table to get the data from, but generate it in-memory as a list of Objects.

All times are GMT -6. The time now is 10:31 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.