Solved

Run-Time error '40002'

Posted on 1998-09-15
6
1,632 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL Bulk load data error 5 34
PL/SQL query 14 51
Stored procedure 23 23
MSSQL: Wrong result in a query (Nulls) 6 0
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now