Deleting records in SQL server from VC++ DAO connection 
Author Message
 Deleting records in SQL server from VC++ DAO connection

Hi,

I am trying to delete some records using a simple
'Delete * from table' execute command and keep on being
timed out.

The connection is fine as I am able to view, delete  and add
records on a recordset basis but in this case i wish to delete
upto 150,000 records.

I have time the delete using SQL Enterprise manage as around
5 to 10 seconds and have set the code to timeout after 30 seconds.

I have also tried experimenting with the number of rows being deleted
and have found that the code starts working if the delete count is less
than around 500 records.

Has anyone got any ideas ???

Cheers

Paul



Fri, 05 Oct 2001 03:00:00 GMT  
 Deleting records in SQL server from VC++ DAO connection
You could try placing the delete query in a stored procedure and see if this
help.  Also look into asynchronous (or is it synchronous) execution whereby
the delete the code does not wait for the query to terminate before
continuing.

HTH
Fergal

--
TO REPLY VIA EMAIL USE
fergal at marketdb dot co dot uk

Quote:
>Hi,

>I am trying to delete some records using a simple
>'Delete * from table' execute command and keep on being
>timed out.

>The connection is fine as I am able to view, delete  and add
>records on a recordset basis but in this case i wish to delete
>upto 150,000 records.

>I have time the delete using SQL Enterprise manage as around
>5 to 10 seconds and have set the code to timeout after 30 seconds.

>I have also tried experimenting with the number of rows being deleted
>and have found that the code starts working if the delete count is less
>than around 500 records.

>Has anyone got any ideas ???

>Cheers

>Paul



Sat, 06 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Cannot delete SQL server duplicate records

2. Connection is busy with results - VC++ 1.52, SQL Server 6.5, ODBC

3. VC++ 1.52, Connection is busy with results - SQL Server 6.5, ODBC

4. Dynaset with Bookmarks to SQL Server connection makes a CRecordset connection read-only

5. How to delete records with DAO?

6. DAO I can't add or delete records...says read-only

7. Perform SQL statement in VC++ against MS SQL Server 7.0

8. Getting a random record from a SQL Server table

9. Locking a record in an MS-SQL Server

10. Error updating SQL-Server record via ODBC (CRecordset)

11. Problem Fetching Records in Bulk using MFC/ODBC/SQL Server

12. Adding records to SQL Server

 

 
Powered by phpBB® Forum Software