ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 7th, 2003, 02:23 PM
gupta_nag gupta_nag is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 4 gupta_nag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry Urgent Exec. time of SP btw Query Analyser and ASP

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.

Reply With Quote
  #2  
Old December 7th, 2003, 07:13 PM
unclefu unclefu is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 120 unclefu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 57 sec
Reputation Power: 6
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.

Reply With Quote
  #3  
Old December 7th, 2003, 07:36 PM
gupta_nag gupta_nag is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 4 gupta_nag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
iam getting time out error at the cmd.execute step itself. :-)

Reply With Quote
  #4  
Old December 7th, 2003, 08:23 PM
unclefu unclefu is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 120 unclefu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 57 sec
Reputation Power: 6
can you give us an error code maybe?

other than that i don't think i'll be of much help

Reply With Quote
  #5  
Old December 7th, 2003, 08:27 PM
gupta_nag gupta_nag is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 4 gupta_nag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
the below r the 2 simultaneous posts for this problem.I think this will help u..

URL

URL

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Urgent Exec. time of SP btw Query Analyser and ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT