Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Created array to database

Author  Topic 

hugob
Starting Member

11 Posts

Posted - 2009-01-10 : 10:04:34
I've a problem. I'm generating with vbscript an array with a lot of data in daily series format. Amount of rows is about 10000. Currently I'm adding that data in array row by row by using INSERT INTO command. Are there any better way to do this?

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2009-01-10 : 21:36:14
You posted in an ASP.NET forum, so I assume you are using ASP.NET (despite a mention of vbscript) so use SQLBulkCopy:

http://www.sqlteam.com/article/use-sqlbulkcopy-to-quickly-load-data-from-your-client-to-sql-server

Either that, or use vbscript to create a file with the data to be inserted, and then use BULK INSERT:

http://msdn.microsoft.com/en-us/library/ms188365.aspx




- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -