|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Why is SQLFreeStmt within the transaction using parameterized insedatabase. 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!!! |
|||||||||||||||||||||||