|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi Experts,
i have a problem in executing a sp through Query Analyser and ASP command object. The execution time of sp in Query Analyser is taking 2 sec and the same exec statement is getting time out through ADO command object in ASP. exec USP_ENQUIRY_SEARCH @ENROLMENT_NO='BLR',@GROUP_NAME='IGATE' and all remaining queries r working fine and execution time between Query Analyser and ASP also same.so there will not be a problem of Networking stuff. Iam recompiled the sp so many times and i rebuiled the indexes that iam using in the query also and i updated the statistics also..but the same problem is repeating.. what will be the problem?can any one guide me. ![]() |
|
#2
|
|||
|
|||
|
i'm definatly not any sort of SQL expert.
but you're saying that using query analyzer the stored procedure is executing quite quickly, but when you go to your ASP page it times out. does your ASP page have code in it to loop through the recordset and display the results. If the answer is NO then someone else is gonna have to help you. If the answer is YES then make sure that right before your "loop" or "wend" statement that you have a "recordset.movenext" statement Code:
set rs = con.execute(query) 'get recordset
do while not rs.eof
'code to display record
loop
that code would just keep looping because it would display the 1st record returned infinitly Code:
do while not rs.eof
'code to display record
rs.movenext
loop
that code calls the MoveNext method of the Recordset object and moves the pointer to the next record, then it checks for the end of the recordset and if it passes then it'll display the next record - else it'll just jump past the loop statement. |
|
#3
|
|||
|
|||
|
iam getting time out error at the cmd.execute step itself. :-)
|
|
#4
|
|||
|
|||
|
can you give us an error code maybe?
other than that i don't think i'll be of much help ![]() |
|
#5
|
|||
|
|||
|
the below r the 2 simultaneous posts for this problem.I think this will help u..
URL URL |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Urgent Exec. time of SP btw Query Analyser and ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|