Solved

PB with a delete request !

Posted on 2002-07-01
5
285 Views
Last Modified: 2010-05-02
I try to kill recording in a table (about 65000) but the request not execute. The execution is stopped and an error returned to me: 3669.
This my code :

SQLB$ = ""
SQLB$ = "DELETE FROM TICKET "
SQLB$ = SQLB$ & "WHERE datediff(day,convert(dateTime,'01/01/2002'),dtcons)>=0 "
SQLB$ = SQLB$ & "AND datediff(day,convert(dateTime,'01/02/2002'),dtcons)<=0 "
Set ds_li2 = hdb.OpenRecordset(SQLB$, dbOpenDynaset, 0, dbOptimisticValue)
 
If somebody can help me! T
hank you in advance
 ankou
0
Comment
Question by:ldanet
  • 2
  • 2
5 Comments
 
LVL 43

Expert Comment

by:TimCottee
Comment Utility
SQLB$ = ""
SQLB$ = "DELETE FROM TICKET "
SQLB$ = SQLB$ & "WHERE datediff(day,convert(dateTime,'01/01/2002'),dtcons)>=0 "
SQLB$ = SQLB$ & "AND datediff(day,convert(dateTime,'01/02/2002'),dtcons)<=0 "
hdb.Execute SQLB$

Use the .Execute method of the database object rather than trying to open a recordset that returns no data.
0
 
LVL 3

Expert Comment

by:PNJ
Comment Utility
Try deleting fewer rows at a time. It may be a problem with the database trying to save the deleted rows in a (hidden) temporary table in case you want to roll back the transaction - the table gets too big and exceeds its allowed temporary space.

Add: " AND ROWNUM < 1000" to the SQL

If that works, just keep running the SQL until no rows are deleted.
0
 

Author Comment

by:ldanet
Comment Utility
Would have it a means to enlarge this temporary table!
If yes how to make to enlarge it?
Thank you in advance!
Being ankou
0
 
LVL 3

Accepted Solution

by:
PNJ earned 50 total points
Comment Utility
I did some research on error 3669 and this is listed as "3669: Execution Cancelled". I have run into problems with large deletes with Oracle as mentioned above, but after some more research I came up with this link which points to timeout values being too short for long running queries: http://archives.postgresql.org/pgsql-interfaces/2001-03/msg00208.php (this site can be searched, so you may want to try for yourself as well. I found this site by using Google to search for "3669 error database").

Before you try the temp table space approach, I would investigate the timeout values first.
0
 

Author Comment

by:ldanet
Comment Utility
Thank you very much for your precious help!
I am going now to try to resolve this problem by beginning with the timeout.
Still thank you!!!!!
ankou
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 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

10 Experts available now in Live!

Get 1:1 Help Now