Problem deleting - server timeout

Results 1 to 3 of 3

Thread: Problem deleting - server timeout

  1. #1
    omc Guest

    Default Problem deleting - server timeout

    I am trying to delete a record from two tables in a MS SQL 7.0 database. The code I&#039m using is<BR><BR>q1="DELETE from ascProdandCategory WHERE Prod_ID="&pid<BR>Conn.Execute(q1)<BR><BR>q2="DELET E from tblProduct WHERE Prod_ID="&pid<BR>Conn.Execute(q2)<BR><BR>This works some times, but often what happens is the first delete takes place and then the server times out before the second delete takes place. The dba tells me the problem is not with the server or the database, so it must be something I&#039m doing.<BR><BR>Any help would be appreciated.

  2. #2
    Rob Guest

    Default RE: Problem deleting - server timeout

    You can set your connection timeout to 0.<BR>adoConn.CommandTimeout = 0<BR><BR>If you are using a command line set that to 0.<BR>adoCmd.CommandTimeout = 0<BR><BR>Hope this works for you<BR>rob

  3. #3
    omc Guest

    Default RE: Problem deleting - server timeout

    Thank you. That in combination with using a transaction seems to working now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts