borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (New Download: A Rainy Day Desktop)Next Topic (New Download: CVSoft) New Topic Post Reply
AndreaVB OnLine : AndreaVB Downloads News and Comments : New Download: Insert lots of records into a table : Access vs. SQL
Poster Resource
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 891
icon New Download: Insert lots of records into a table : Access vs. SQL

New download available:
Insert lots of records into a table : Access vs. SQL

Description:
Our German office recently upgraded an application from MSAccess to SQL Server, and noted some horrifying performance drops when adding many records to a table (ie. parsing a text file and inserting records). We scratched around and came up with the attached solution.
We tried 5 methods of adding data, and finally settled on the follwing:
Convert the data to add into an XML document and use SQL2000 XML capabilities to bulk-insert the data.
Try the tests for yourself and see the difference it made (approx. 500% faster than other methods).
Thought you might find it useful.

Note
You will have to register the kwconnectionstring.dll - it just constructs an ADO connection string for you, and you'll need MSXML4+.

Usage:
Run the SQL script to create the SQL database, and alter the connection string to point to your sql server.
Run the app.
Click Command1, this will run the inserts into SQL using ADO recordset and time it.
Change Frame1 to Access lokal and click again. You see the speed difference and issue!
Change Frame1 to SQL Server again and
select "Use SQL XML" and click Command1 again.
Multi-test will average out the tick count for a number of tests for you.

03-03-2005 at 06:39 AM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : AndreaVB Downloads News and Comments : New Download: Insert lots of records into a table : Access vs. SQL
Previous Topic (New Download: A Rainy Day Desktop)Next Topic (New Download: CVSoft)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder