Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Connection busy with another hstmt in sql Server

Author  Topic 

rashmip
Starting Member

4 Posts

Posted - 2005-09-02 : 03:06:11
Hello,
I am having above mentioned error while inserting records in database.This arises sometimes after 10 records or 20 records.I dont have any object such as hstmt.
before this insert query ,there is another query where I get one colume value from another table.
please can anybody tell me reason of this kind of error.
Thanks in advance

Kristen
Test

22859 Posts

Posted - 2005-09-02 : 03:42:40
You will get this error if you use a database connection for a SQL statement, and start retrieving data but do NOT finish retrieving all the data, and then use the SAME connection for a second SQL statement.

"before this insert query ,there is another query where I get one colume value from another table"

I reckon that's it - there are probably more rows in that record set still awaiting retrieval

If this is the case you either need to retrieve all the data from the first resultset (into an array or somesuch), or create a second connection.

Kristen
Go to Top of Page
   

- Advertisement -