HighTechTalks DotNet Forums  

Why is SQLFreeStmt within the transaction using parameterized inse

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss Why is SQLFreeStmt within the transaction using parameterized inse in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
EricR
 
Posts: n/a

Default Why is SQLFreeStmt within the transaction using parameterized inse - 10-24-2007 , 10:33 AM






I am using ODBC.NET to perform mulitple parameterized inserts into a
database. The performance has been terrible. Upon research into the ODBC
trace log, it appears the a SQLFreeStmt is being executed by ODBC upon every
ExecuteNonQuery that I am issuing. This is causing a huge amount of overhead,
especially when working with thousands of inserts. When coding against the
ODBC API (outside of .NET), I only issue the SQLFreeStmt upon committing the
data, and it is very quick (as expected). Of course, I need to figure this
out in .NET, as this is our platform.

Here is basically what I am doing in .NET:
1) Open OdbcConnection
2) Begin Transaction
3) Create OdbcCommand and assign to transaction
4) Create parameter collection
5) Loop through all records, assign values to parms, and perform
parameterized inserts
6) Commit transaction
7) Close transaction.

Any ideas on what I can do to stop these SQLFreeStmts from being issued
would be greatly appreciated! Thanks in advance!!!

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.