VB3 & SQL6.5 ODBC Error #3146

VB3 & SQL6.5 ODBC Error #3146

Post by Gregory D. Podest » Sat, 01 Feb 1997 04:00:00



We have a very large application running in VB3 with NT3.51/SQLServer6.0 &
NT4.0/SQLServer6.5 and a mix of DAO's and Data Controls.  We are
consistently getting this error with or without a lot of connections to the
database and/or server:

ODBC--call failed.  [Microsoft][ODBC SQL Server Driver] Connection is busy
with results for another hstmt (#0)

I put a break point on EVERY line that referenced my data objects, and the
following sequence is the result:

        ok:     db.createsnapshot(SELECT * FROM USERS WHERE....)
        ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
        ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
        ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
        ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
        ok:     db.createsnapshot(SELECT CLIENTKEY FROM....)
        ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
        ok:     db.execute (UPDATE CLIENTS SET....)
        ok:     db.execute (UPDATE CLA_STATS....)
        ok:     db.createsnapshot(SELECT * FROM BUSINESSTYPES)
        ok:     db.execute (UPDATECLIENTS SET...)
        ok:     db.createsnapshot(SELECT CORPACCTNUMB, CLAKEY.....)
        ERR:    db.execute (UPDATE CLIENTS SET SITECURRENT....)         (Code break, then I
continue)
        ERR:    db.createsnapshot (SELECT *F ROM CLIENTS WHERE....)     (Code break, then
I continue)
        ok:     db.execute (UPDATE CLEINTS SET....)

We are at our wits end, and deadlines are approachiing WAY to
fast...........HELP ME, HELP ME, HELP ME!!!!!!!!!!!!
Any assistance would be greatly appreciated  :)

 
 
 

VB3 & SQL6.5 ODBC Error #3146

Post by Karl Costenbade » Sun, 02 Feb 1997 04:00:00


The problem is that there are still results pending on the
CreateSnapshot, which ODBC needs to finish up before it can do the next
action. To fix this error, after creating the snapshot, MoveLast on it
and then MoveFirst. The MoveLast will finish the pending results.

Good luck.


> We have a very large application running in VB3 with NT3.51/SQLServer6.0 &
> NT4.0/SQLServer6.5 and a mix of DAO's and Data Controls.  We are
> consistently getting this error with or without a lot of connections to the
> database and/or server:

> ODBC--call failed.  [Microsoft][ODBC SQL Server Driver] Connection is busy
> with results for another hstmt (#0)

> I put a break point on EVERY line that referenced my data objects, and the
> following sequence is the result:

>         ok:     db.createsnapshot(SELECT * FROM USERS WHERE....)
>         ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
>         ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
>         ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
>         ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
>         ok:     db.createsnapshot(SELECT CLIENTKEY FROM....)
>         ok:     db.createsnapshot(SELECT CONTROLSTRING FROM CONTROL WHERE....)
>         ok:     db.execute (UPDATE CLIENTS SET....)
>         ok:     db.execute (UPDATE CLA_STATS....)
>         ok:     db.createsnapshot(SELECT * FROM BUSINESSTYPES)
>         ok:     db.execute (UPDATECLIENTS SET...)
>         ok:     db.createsnapshot(SELECT CORPACCTNUMB, CLAKEY.....)
>         ERR:    db.execute (UPDATE CLIENTS SET SITECURRENT....)         (Code break, then I
> continue)
>         ERR:    db.createsnapshot (SELECT *F ROM CLIENTS WHERE....)     (Code break, then
> I continue)
>         ok:     db.execute (UPDATE CLEINTS SET....)

> We are at our wits end, and deadlines are approachiing WAY to
> fast...........HELP ME, HELP ME, HELP ME!!!!!!!!!!!!
> Any assistance would be greatly appreciated  :)

--
Karl Costenbader, President
Competent Consulting
Sacramento, CA

Home Page: http://www.competent.com

 
 
 

VB3 & SQL6.5 ODBC Error #3146

Post by Caron Moone » Fri, 14 Feb 1997 04:00:00


Maybe you can help me too. I'm having a similar problem in a very similar
environment. VB3 with NT3.51/SQLServer6.0 , WFW 3.11 on the client.

The error we get is intermittent:
Error Code #3146
ODBC- call failed. Communication link failure [#1]

We use Sheridan controls, bound grids, but ALL SQL is Stored Procedures in
SQL 6.0.
I've updated every dll I can find on newly released CD's and every time I
think I've cracked it, we get the error again.
Am also in quite desperate situation with an application due to go live in
two weeks.

ALL HELP GRATEFULLY ACCEPTED
Caron