Solved

Run-Time error '40002'

Posted on 1998-09-15
6
1,664 Views
Last Modified: 2008-03-06
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.
0
Comment
Question by:chuatj
6 Comments
 
LVL 7

Expert Comment

by:spiridonov
ID: 1090065
What language do you use?
0
 

Author Comment

by:chuatj
ID: 1090066
The GUI was developed using Visual Basic 5.0 and it communicates with SQL Server through RDO.
0
 

Expert Comment

by:NateT
ID: 1090067
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:chuatj
ID: 1090068
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
 

Author Comment

by:chuatj
ID: 1090069
Adjusted points to 100
0
 

Accepted Solution

by:
manish77 earned 100 total points
ID: 1090070
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question