Run time error 3669. Execution cancelled

Run time error 3669. Execution cancelled

Post by anita her » Wed, 12 Nov 2003 21:19:43



Hi All

I found an error ( run time error 3669. Execution
cancelled) when ran the following query via VB6 SP5.

select crc,month,sum(v) as v
from ( select crc,v,
          case when fadate between '1/1/2003'
                    and '1/31/2003' then 1
          else 2 end as month
       from x  
       where year = '2003' and acc = '99020020') as t
group by crc,month

When the same query was run directly under query analyser
on the server, I did not find any problem. It produced
120 rows. The execution time was arround 100 seconds.
The table x contain 5 million rows.

Then I tried to reduce the number of rows in the table x
to be one thousand rows by modifying the query :

select crc,month,sum(v) as v
from ( select top 1000 crc,v,
          case when fadate between '1/1/2003'
               and '1/31/2003' then 1
          else 2 end as month
       from x  
       where year = '2003' and acc = '99020020') as t
group by crc,month

The new query version above could be run normally via VB.

Note :

The libray I use is Microsoft DAO 3.6
The connecion setting :
  DBEngine.DefaultType = dbUseODBC
  x = "ODBC;DRIVER=SQL server; UID=xx; PWD=aa;
      SERVER=SRV2003; DATABASE=abc"
  Set cn = OpenConnection("", dbDriverNoPrompt, False, x)

The record set setting when the error appeared :
  Set rs = cn.OpenRecordset(sql, dbOpenDynaset)
  Where sql contains query above.

Please help me

Thanks in advance

Anita Hery

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

Run time error 3669. Execution cancelled

Post by Steve Kas » Thu, 13 Nov 2003 00:14:25


Anita,

  It sounds like your query is exceeding the time limit for the
connection.  It should be possible to add something like
QueryTimeout=0 to your connection string.  A value of 0
means no timeout limit; otherwise the value is in seconds,
so something like QueryTimeout=600 might be good.

  Also, depending on your indexes, something like
this might be faster:

select crc, 1 as month, sum(v) as v
from x
where fadate between '20030101' and '20030131'
group by crc
union all
select crc, 2 as month, sum(v) as v
from x
where fadate not between '20030101' and '20030131'
group by crc

-- Steve Kass
-- Drew University
-- Ref: 5FFA80A4-836F-4CB1-AC64-B990F5A90B7B


>Hi All

>I found an error ( run time error 3669. Execution
>cancelled) when ran the following query via VB6 SP5.

>select crc,month,sum(v) as v
>from ( select crc,v,
>      case when fadate between '1/1/2003'
>                    and '1/31/2003' then 1
>          else 2 end as month
>       from x  
>       where year = '2003' and acc = '99020020') as t
>group by crc,month

>When the same query was run directly under query analyser
>on the server, I did not find any problem. It produced
>120 rows. The execution time was arround 100 seconds.
>The table x contain 5 million rows.

>Then I tried to reduce the number of rows in the table x
>to be one thousand rows by modifying the query :

>select crc,month,sum(v) as v
>from ( select top 1000 crc,v,
>      case when fadate between '1/1/2003'
>               and '1/31/2003' then 1
>          else 2 end as month
>       from x  
>       where year = '2003' and acc = '99020020') as t
>group by crc,month

>The new query version above could be run normally via VB.

>Note :

>The libray I use is Microsoft DAO 3.6
>The connecion setting :
>  DBEngine.DefaultType = dbUseODBC
>  x = "ODBC;DRIVER=SQL server; UID=xx; PWD=aa;
>      SERVER=SRV2003; DATABASE=abc"
>  Set cn = OpenConnection("", dbDriverNoPrompt, False, x)

>The record set setting when the error appeared :
>  Set rs = cn.OpenRecordset(sql, dbOpenDynaset)
>  Where sql contains query above.

>Please help me

>Thanks in advance

>Anita Hery

>*** Sent via Developersdex http://www.developersdex.com ***
>Don't just participate in USENET...get rewarded for it!


 
 
 

Run time error 3669. Execution cancelled

Post by anita her » Thu, 13 Nov 2003 12:33:21


Steve Kass,

You are absolutely right.
Thanks for your help

Anita Hery

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

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. Filemaker Pro Question

3. Error 3669: Execution cancelled!

4. How to set up P.SQL 7 standalone?

5. What is Error 3669: Execution Cancelled ?

6. Redo copy latch contention

7. Error 3669 execution cancelled

8. Phone Interface

9. Error 3669: Execution cancelled.

10. Error '3669' Execution Cancelled

11. Error 3669 execution cancelled

12. Blocking Processes Cause 3669 Execution Cancelled, help!

13. Execution cancelled 3669?