dcsimg
"[ODBC Sql Server Driver]Connection is busy with results <BR>from another hstmt" ERROR: when attempt to DROP OR <BR>INSERT after INSERT.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Saintloth
Posted On:   Wednesday, April 24, 2002 08:36 AM

I am writing an application that will self build tables on Sql 2000. I am able to connect and create and drop tables but when I try inserting data and then dropping the table afterward I get the error listed above. What am I doing wrong? I found that when I do a TRUNCATE before attempting to DROP, it works but **only** from a SQL Query Tool window and NOT through a JDBC call from the app. for the exact same TRUNCATE command. I also get the same error when trying to INSERT after INSERT from the app. which makes using the dbase entirely useless since I'll need to do multiple INSERTS,UPDATES AND DELETES. As before, the same INSERT works perfectly from the Sql Query Too   More>>
			
I am writing an application that will self build tables on
Sql 2000. I am able to connect and create and drop
tables but when I try inserting data and then dropping the table afterward I get the error listed above.
What am I doing wrong? I found that when I do a TRUNCATE before attempting to DROP,
it works but **only** from a SQL Query Tool window and NOT through a
JDBC call from the app. for the exact same TRUNCATE command.
I also get the same error
when trying to INSERT after INSERT from the app. which
makes using the dbase entirely useless since I'll need to
do multiple INSERTS,UPDATES AND DELETES.
As before, the same INSERT works perfectly from the Sql Query
Tool Window however.



Any Idea why this is happening?


			
Any help provided would be much appreciated.


Regards,

Dsl    <<Less

Re: "[ODBC Sql Server Driver]Connection is busy with results <BR>from another hstmt" ERROR: when attempt to DROP OR <BR>INSERT after INSERT.

Posted By:   Christopher_Schultz  
Posted On:   Wednesday, April 24, 2002 10:34 AM

What is the state of AUTOCOMMIT? If you haven't committed some of those INSERTs, then the table may be locked and un-droppable.



Try doing a connection.commit(); before you drop your table.



-chris
About | Sitemap | Contact