Link to home
Start Free TrialLog in
Avatar of chuatj
chuatj

asked on

Run-Time error '40002'

My application is built on top of SQL Server 6.5. While trying to access the DB through the GUI, I encountered the following message:
Run-Time error '40002'
S1000:{Microsoft][ODBC SQL Server Driver]Connection is busy with results of another hstmt. Please advise.
Avatar of Victor Spiridonov
Victor Spiridonov
Flag of Russian Federation image

What language do you use?
Avatar of chuatj
chuatj

ASKER

The GUI was developed using Visual Basic 5.0 and it communicates with SQL Server through RDO.
If you are running the rdoqueries async then just check the stillexecuting property before executing another query on the same database connection.... Same goes for stored procs.
Avatar of chuatj

ASKER

In our application, we used two methods:

1. rdAsynEnable, and we did check the 'stillexecuting' property before executing the next query

2. rdConcurReadOnly, in this case, no checking is needed
 
Avatar of chuatj

ASKER

Adjusted points to 100
ASKER CERTIFIED SOLUTION
Avatar of manish77
manish77

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial