Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 4th, 2016, 07:19 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB slow response over the network

We are classic ASP programmer. We are using the database sql server 2005 management studio. ASP page is on one machine (Window server 2012 R2) and sql server 2005 management studio is on another machine (Window server 2003). When run the ASP page, It gives very slow response.
Script look like this.

strsql="select * from test1" '' 25 records on this table
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open strsql, objCnn

if not rs.eof then
while not rs.eof
id = rs("id")
qty="select count(*) as tcount from test2 where id=" & id
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.open qty, objCnn
if not rs1.eof then
tcount = rs1("tcount")
end if
rs1.close
set rs1=nothing
rs.movenext
wend
end if
rs.Close : Set rs = Nothing

when both database and ASP script on same machine then it does not take time to response. It gives response in 1-2 second but when both is in different machine it takes long time then gives the response. Some times it gives ScriptTimeout error.
We have opened the both database on the same machine and run the same query it does not take time. Query execute time is Approx.equal.

Is there missing any IIS or ADO setting?

Can you please help us?

Last edited by santosh; November 10th, 2016 at 12:13 AM.
Reply With Quote
  #2 (permalink)  
Old November 6th, 2016, 07:02 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

How slow is the connection between the two machines? When you connect from SSMS on the webserver to the remote SQL Server, is it slow then too?

Also, what connection string are you using?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old November 10th, 2016, 12:14 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
How slow is the connection between the two machines? When you connect from SSMS on the webserver to the remote SQL Server, is it slow then too?

Also, what connection string are you using?

Imar

Thanks for reply

When database is on the same machine then it takes 1-2 seconds If database is on another machine then it takes 40-45 seconds on this simple query. If query is big then assume that how much time will take.

We are using connection string like

Provider=SQLOLEDB;Password=testpass;User ID=testuser;Initial Catalog=testdatabase;Data Source=testserver\sqlexpress

Last edited by santosh; November 10th, 2016 at 12:35 AM.
Reply With Quote
  #4 (permalink)  
Old November 13th, 2016, 07:46 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

What I meant was: is the network between the two machines slow? Did you check the speed between the two machines?

Also, try (temporarily) disabling firewall and security software and see of that helps. Finally, try connecting to the machine's IP instead of name.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to slow down this flow jjk2 Beginning VB 6 8 January 28th, 2008 06:12 PM
SLOW TRANSFORAMTION pallone XSLT 5 January 24th, 2007 02:49 PM
How to get adodb.record from adodb.recordset John Pennington Pro VB Databases 1 November 20th, 2004 05:17 AM
MSDE SLOW JENKINSACTIVE SQL Server 2000 1 October 28th, 2004 09:01 AM



All times are GMT -4. The time now is 05:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.