Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PB with a delete request !

Posted on 2002-07-01
5
Medium Priority
?
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 7121771
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
ID: 7122264
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
ID: 7123978
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 200 total points
ID: 7124098
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
ID: 7124113
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 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