Solved

Run-Time error '40002'

Posted on 1998-09-15
6
1,714 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

623 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