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.
chuatjAsked:
Who is Participating?
 
manish77Connect With a Mentor Commented:
Try setting the result set to nothing before executing the next query. If you need it then assign it it some other result set .
0
 
Victor SpiridonovCommented:
What language do you use?
0
 
chuatjAuthor Commented:
The GUI was developed using Visual Basic 5.0 and it communicates with SQL Server through RDO.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
NateTCommented:
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.
0
 
chuatjAuthor Commented:
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
 
0
 
chuatjAuthor Commented:
Adjusted points to 100
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.