Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Time Out Error


Message #1 by william.sze@s... on Fri, 22 Feb 2002 09:49:04 -0500

Hi ,



I'm using sql server and have the following simple sql statment in asp to

delete record in tables:



sql = "DELETE tablename WHERE itemID = " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William



Message #2 by "Jerry Diegel" <diegelj@g...> on Fri, 22 Feb 2002 08:45:47 -0600
Is SQL server timing out, or are you getting an ASP timeout?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 8:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Time Out Error







Hi ,



I'm using sql server and have the following simple sql statment in asp 

to

delete record in tables:



sql =3D "DELETE tablename WHERE itemID =3D " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William








$subst('Email.Unsub').

Message #3 by "TomMallard" <mallard@s...> on Fri, 22 Feb 2002 07:02:27 -0800
sql = "DELETE * FROM tablename WHERE itemID = " & intItemID



If you want to delete the table use DROP...



sql = "DROP tablename"



tom mallard

seattle

-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 6:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Time Out Error







Hi ,



I'm using sql server and have the following simple sql statment in asp to

delete record in tables:



sql = "DELETE tablename WHERE itemID = " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William








$subst('Email.Unsub').



Message #4 by william.sze@s... on Fri, 22 Feb 2002 10:50:07 -0500

Jerry,



It's a server timeout with

error number = -2147217871

error source = Microsoft OLE DB Provider for SQL Server



Should I use

Server.ScriptTimeOut = 300

to set the time out value



What is the recommended value?



Tom,



refer to your other reply, I just want to delete one record, not to delete

the whole table. So DROP is not appropriate in my case.





Thanks

William





                                                                                                                   

                    "Jerry Diegel"                                                                                 

                    <diegelj@g...       To:     "ASP Web HowTo" <asp_web_howto@p...>                      

                    ub.com>              cc:                                                                       

                                         Subject:     [asp_web_howto] RE: Time Out Error                           

                    02/22/2002                                                                                     

                    09:45 AM                                                                                       

                    Please respond                                                                                 

                    to "ASP Web                                                                                    

                    HowTo"                                                                                         

                                                                                                                   

                                                                                                                   









Is SQL server timing out, or are you getting an ASP timeout?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 8:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Time Out Error







Hi ,



I'm using sql server and have the following simple sql statment in asp to

delete record in tables:



sql = "DELETE tablename WHERE itemID = " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William








$subst('Email.Unsub').






$subst('Email.Unsub').









Message #5 by "Jerry Diegel" <diegelj@g...> on Fri, 22 Feb 2002 11:03:28 -0600
It doesn't look like Server.Timeout will help you then.  I say that 

because OLE DB errors are usually returned from the database.  Have you 

tried running your query from enterprise manager or query analyzer?  

Also, though I don't think this would cause it, are the foreign key 

constraints enforced or implied?  Are there any triggers tied to TableA?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 9:50 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Time Out Error







Jerry,



It's a server timeout with

error number =3D -2147217871

error source =3D Microsoft OLE DB Provider for SQL Server



Should I use

Server.ScriptTimeOut =3D 300

to set the time out value



What is the recommended value?



Tom,



refer to your other reply, I just want to delete one record, not to 

delete

the whole table. So DROP is not appropriate in my case.





Thanks

William





                                                                         

                                         

                    "Jerry Diegel"                                       

                                         

                    <diegelj@g...       To:     "ASP Web HowTo" 

<asp_web_howto@p...>                     

                    ub.com>              cc:                             

                                         

                                         Subject:     [asp_web_howto] 

RE: Time Out Error                          

                    02/22/2002                                           

                                         

                    09:45 AM                                             

                                         

                    Please respond                                       

                                         

                    to "ASP Web                                          

                                         

                    HowTo"                                               

                                         

                                                                         

                                         

                                                                         

                                         









Is SQL server timing out, or are you getting an ASP timeout?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 8:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Time Out Error







Hi ,



I'm using sql server and have the following simple sql statment in asp 

to

delete record in tables:



sql =3D "DELETE tablename WHERE itemID =3D " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William








$subst('Email.Unsub').






$subst('Email.Unsub').














$subst('Email.Unsub').

Message #6 by william.sze@s... on Fri, 22 Feb 2002 13:46:41 -0500

It works in query analyzer. For tableA it took 30seconds, while 11secs in

tableB.



It is an enforce relationship. No trigger.



William





                                                                                                                   

                    "Jerry Diegel"                                                                                 

                    <diegelj@g...       To:     "ASP Web HowTo" <asp_web_howto@p...>                      

                    ub.com>              cc:                                                                       

                                         Subject:     [asp_web_howto] RE: Time Out Error                           

                    02/22/2002                                                                                     

                    12:03 PM                                                                                       

                    Please respond                                                                                 

                    to "ASP Web                                                                                    

                    HowTo"                                                                                         

                                                                                                                   

                                                                                                                   









It doesn't look like Server.Timeout will help you then.  I say that because

OLE DB errors are usually returned from the database.  Have you tried

running your query from enterprise manager or query analyzer?  Also, though

I don't think this would cause it, are the foreign key constraints enforced

or implied?  Are there any triggers tied to TableA?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 9:50 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Time Out Error







Jerry,



It's a server timeout with

error number = -2147217871

error source = Microsoft OLE DB Provider for SQL Server



Should I use

Server.ScriptTimeOut = 300

to set the time out value



What is the recommended value?



Tom,



refer to your other reply, I just want to delete one record, not to delete

the whole table. So DROP is not appropriate in my case.





Thanks

William







                    "Jerry Diegel"



                    <diegelj@g...       To:     "ASP Web HowTo"

<asp_web_howto@p...>

                    ub.com>              cc:



                                         Subject:     [asp_web_howto] RE:

Time Out Error

                    02/22/2002



                    09:45 AM



                    Please respond



                    to "ASP Web



                    HowTo"















Is SQL server timing out, or are you getting an ASP timeout?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 8:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Time Out Error







Hi ,



I'm using sql server and have the following simple sql statment in asp to

delete record in tables:



sql = "DELETE tablename WHERE itemID = " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William








$subst('Email.Unsub').






$subst('Email.Unsub').














$subst('Email.Unsub').






$subst('Email.Unsub').









Message #7 by "Jerry Diegel" <diegelj@g...> on Fri, 22 Feb 2002 14:04:44 -0600
Well, the one thing you might try is to load your delete query into a 

command object and execute it asynchronously.  If you do that, you will 

need to go into the db and confirm that your query was executed 

correctly.



Jerry



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 12:47 PM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Time Out Error







It works in query analyzer. For tableA it took 30seconds, while 11secs 

in

tableB.



It is an enforce relationship. No trigger.



William





                                                                         

                                         

                    "Jerry Diegel"                                       

                                         

                    <diegelj@g...       To:     "ASP Web HowTo" 

<asp_web_howto@p...>                     

                    ub.com>              cc:                             

                                         

                                         Subject:     [asp_web_howto] 

RE: Time Out Error                          

                    02/22/2002                                           

                                         

                    12:03 PM                                             

                                         

                    Please respond                                       

                                         

                    to "ASP Web                                          

                                         

                    HowTo"                                               

                                         

                                                                         

                                         

                                                                         

                                         









It doesn't look like Server.Timeout will help you then.  I say that 

because

OLE DB errors are usually returned from the database.  Have you tried

running your query from enterprise manager or query analyzer?  Also, 

though

I don't think this would cause it, are the foreign key constraints 

enforced

or implied?  Are there any triggers tied to TableA?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 9:50 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Time Out Error







Jerry,



It's a server timeout with

error number =3D -2147217871

error source =3D Microsoft OLE DB Provider for SQL Server



Should I use

Server.ScriptTimeOut =3D 300

to set the time out value



What is the recommended value?



Tom,



refer to your other reply, I just want to delete one record, not to 

delete

the whole table. So DROP is not appropriate in my case.





Thanks

William







                    "Jerry Diegel"



                    <diegelj@g...       To:     "ASP Web HowTo"

<asp_web_howto@p...>

                    ub.com>              cc:



                                         Subject:     [asp_web_howto] 

RE:

Time Out Error

                    02/22/2002



                    09:45 AM



                    Please respond



                    to "ASP Web



                    HowTo"















Is SQL server timing out, or are you getting an ASP timeout?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 8:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Time Out Error







Hi ,



I'm using sql server and have the following simple sql statment in asp 

to

delete record in tables:



sql =3D "DELETE tablename WHERE itemID =3D " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William








$subst('Email.Unsub').






$subst('Email.Unsub').














$subst('Email.Unsub').






$subst('Email.Unsub').














$subst('Email.Unsub').

Message #8 by william.sze@s... on Mon, 25 Feb 2002 11:14:39 -0500

Jerry,



I I just deleted the FK for tableD because tableD (over 3 millions records)

is not taking any data from tableA. Every record in that field is null. So

now there is no more time out error. Thanks for your help.



BTW, would you mind tell me which one is better for deleting record/set

inactive flag for the record from parent table:

1. execute delete sql statment

     "DELETE tblProcess WHERE ProcessID= 1"

    if err.Number = -2147217900    then  'FK error no.

     execute "UPDATE tblProcess SET Inactive=1 WHERE ProcessID=1"

    end if



2. check the link of the Parent table with the child table;

    execute SELECT sql statment to check record count > 0

    if record count > 0 then

     execute DELETE sql statment

    else

     execute UPDATE sql statment

   end if



Thanks

William









                                                                                                                   

                    "Jerry Diegel"                                                                                 

                    <diegelj@g...       To:     "ASP Web HowTo" <asp_web_howto@p...>                      

                    ub.com>              cc:                                                                       

                                         Subject:     [asp_web_howto] RE: Time Out Error                           

                    02/22/2002                                                                                     

                    03:04 PM                                                                                       

                    Please respond                                                                                 

                    to "ASP Web                                                                                    

                    HowTo"                                                                                         

                                                                                                                   

                                                                                                                   









Well, the one thing you might try is to load your delete query into a

command object and execute it asynchronously.  If you do that, you will

need to go into the db and confirm that your query was executed correctly.



Jerry



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 12:47 PM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Time Out Error







It works in query analyzer. For tableA it took 30seconds, while 11secs in

tableB.



It is an enforce relationship. No trigger.



William







                    "Jerry Diegel"



                    <diegelj@g...       To:     "ASP Web HowTo"

<asp_web_howto@p...>

                    ub.com>              cc:



                                         Subject:     [asp_web_howto] RE:

Time Out Error

                    02/22/2002



                    12:03 PM



                    Please respond



                    to "ASP Web



                    HowTo"















It doesn't look like Server.Timeout will help you then.  I say that because

OLE DB errors are usually returned from the database.  Have you tried

running your query from enterprise manager or query analyzer?  Also, though

I don't think this would cause it, are the foreign key constraints enforced

or implied?  Are there any triggers tied to TableA?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 9:50 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Time Out Error







Jerry,



It's a server timeout with

error number = -2147217871

error source = Microsoft OLE DB Provider for SQL Server



Should I use

Server.ScriptTimeOut = 300

to set the time out value



What is the recommended value?



Tom,



refer to your other reply, I just want to delete one record, not to delete

the whole table. So DROP is not appropriate in my case.





Thanks

William







                    "Jerry Diegel"



                    <diegelj@g...       To:     "ASP Web HowTo"

<asp_web_howto@p...>

                    ub.com>              cc:



                                         Subject:     [asp_web_howto] RE:

Time Out Error

                    02/22/2002



                    09:45 AM



                    Please respond



                    to "ASP Web



                    HowTo"















Is SQL server timing out, or are you getting an ASP timeout?



-----Original Message-----

From: william.sze@s... [mailto:william.sze@s...]

Sent: Friday, February 22, 2002 8:49 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Time Out Error







Hi ,



I'm using sql server and have the following simple sql statment in asp to

delete record in tables:



sql = "DELETE tablename WHERE itemID = " & intItemID



It gives me time out error on one specific tableA but it works fine on

other tables (tableB, tableC).



Please advise what could be wrong with that specific tableA.



Note: record in tableA is FK of tableD and tableE.

record in tableB is FK of tableD and tableE and tableF.

record in tableA is FK of tableD and tableF.



Thanks

William








$subst('Email.Unsub').






$subst('Email.Unsub').














$subst('Email.Unsub').






$subst('Email.Unsub').














$subst('Email.Unsub').






$subst('Email.Unsub').










  Return to Index