|
-
May 1st, 2006, 02:12 PM
#1
Thread Starter
New Member
[02/03] How to make tons on insert statements more effecient?
Hello I am new here and sort of new to VB.NET. I am trying to write a program that will take the national do not call list for a certain area code, which is given to me in a comma seprated file, and then to check if the number is in a database, if it isn't then to insert it. There are literaly millions of numbers. They way I have written it is so slow because I don't really know how to write database applications. Everytime I check to see if a number exists I open a connection and then run an OleDbCommand and ExecuteScalar then I close the connection. Then if it doesnt exist then I Open another connection and Insert then close. Is there a way I can just open the connection once at the beggined then do all my queries and then close it at the end? Is there something else I can do to speed this up, because the way I have it right now it will take days and days to complete.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|