SP execution getting 'Operation Cancelled'

SP execution getting 'Operation Cancelled'

Post by Meade Robbo » Thu, 07 Jan 1999 04:00:00



Greg;

try iterating through the DBEngine.Errors collection. Usually, there will be
more error info in there; you are only seeing the top-most message in the
stack.

something like:

For mIndex = 1 to DBEngine.Errors.Count
    Debug.Print DBEngine.Errors(mIndex).Description
Next

This will hopefully help. You can comment this stuff out after it works, and
if you have problems later, just un-comment the lines to revive the extra
debugging info.

-Meade


Quote:>I am using a stored procedure to copy about 24000 records from one table to
>another.  I am invoking the sp from a vb5 program.  Code snip follows:

>    Set workspace1 = DBEngine.CreateWorkspace("odbc", "uid", "pwd",
>dbUseODBC)
>    Set dbSQL = workspace1.OpenDatabase("ODBC", dbDriverPrompt)
>    Set qdRevenue = dbSQL.Connection.CreateQueryDef("", "Exec
>CopyImportRevenue")
>    qdRevenue.Execute dbRunAsync

>Problem is, it executes for a couple of minutes, then dies.  If I check
>qdRevenue.StillExecuting after it dies, I get 'Operation Cancelled'.  If I
>check it before it dies, it correctly returns True.

>Two questions:

>1) Does anyone recognize this problem?

>2) When you get an "Operation Cancelled", how do you diagnose the real
>cause of the problem?

>PS:  The log is 75 mb - and not anywhere near full.  If I run the sp from
>SQL Enterprise Manager, it runs a-ok.

 
 
 

SP execution getting 'Operation Cancelled'

Post by Greg Olive » Thu, 07 Jan 1999 04:00:00


I am using a stored procedure to copy about 24000 records from one table to
another.  I am invoking the sp from a vb5 program.  Code snip follows:

    Set workspace1 = DBEngine.CreateWorkspace("odbc", "uid", "pwd",
dbUseODBC)
    Set dbSQL = workspace1.OpenDatabase("ODBC", dbDriverPrompt)
    Set qdRevenue = dbSQL.Connection.CreateQueryDef("", "Exec
CopyImportRevenue")
    qdRevenue.Execute dbRunAsync

Problem is, it executes for a couple of minutes, then dies.  If I check
qdRevenue.StillExecuting after it dies, I get 'Operation Cancelled'.  If I
check it before it dies, it correctly returns True.

Two questions:

1) Does anyone recognize this problem?

2) When you get an "Operation Cancelled", how do you diagnose the real
cause of the problem?

PS:  The log is 75 mb - and not anywhere near full.  If I run the sp from
SQL Enterprise Manager, it runs a-ok.

 
 
 

SP execution getting 'Operation Cancelled'

Post by Greg Olive » Wed, 13 Jan 1999 04:00:00


Thanks for the suggestion -

There is no further information in this collection.



Quote:> Greg;

> try iterating through the DBEngine.Errors collection. Usually, there will
be
> more error info in there; you are only seeing the top-most message in the
> stack.

> something like:

> For mIndex = 1 to DBEngine.Errors.Count
>     Debug.Print DBEngine.Errors(mIndex).Description
> Next

> This will hopefully help. You can comment this stuff out after it works,
and
> if you have problems later, just un-comment the lines to revive the extra
> debugging info.

> -Meade

 
 
 

1. Run time Error '3669' Execution cancelled

Hello all,
    I am using Visual Basic6.0, SQL server6.5 and ODBC3.0.
    I get the error message as listed in the title whenever I execute a
OpenRecord with a sql statement having JOIN and agregation function
against two tables having 100000 records and 1000 records respectively.
    However, for the same sql statement, there is no error when I use
the GUI client program isql_w instead of ODBC in VB

Thx in advance
TCG

2. self join in update queries

3. 'Execution was cancelled by user'

4. Creating a Last Updated trigger

5. Error '3669' Execution Cancelled

6. How to user remote tape in Informix

7. The operation was cancelled at the user's reques

8. operation cancelled at the user's request?

9. Optimizer recompiling SP's during Execution

10. Execution of SP's

11. stupid question - comments don't effect SP execution time

12. Run-time error '524': This action was cancelled by an associated object