473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

script Timeout

I'm fairly new to ASP and have attempted to create a link tracker using SQL
Stored Procedures. The procedures work but my script timesout when calling
them through ASP

Script is below, any help would be gratefully appreciated.

Gary Smith

------------------------CODE -------------------------------
<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True
%>
<!-- #include file="DBConnectTracker.inc"-->
<%
Dim strLinkID
Dim cnnLinkTracker
Dim rsGetLink
Dim rsLinkTracker
Dim rsLinkTrackerMod
Dim strLinkName

strLinkID = Request.QueryString("LinkID")

If strLinkID > "" Then
' Create a new connection
Set cnnLinkTracker = GetDBConnection()
'Get Link Information from Database
set rsGetLink = server.createobject("adodb.recordset")
rsGetLink.Open "Exec getLink " & strLinkID ,cnnLinkTracker

'Set default link target
If rsGetLink.EOF Then
strLinkName = "nolink.asp"
Else
strLinkName = rsGetLink("page")
'Get Link Tracker Information from Database
Set rsLinkTracker = Server.CreateObject("ADODB.Recordset")
rsGetLink.Open "Exec getLinkTracker " & strLinkID ,cnnLinkTracker
'Create Object for Insert or Update Procedure
Set rsLinkTrackerMod = Server.CreateObject("ADODB.Recordset")
If rsLinkTracker.EOF Then
rsLinkTrackerMod.Open "Exec insertLinkTracker " & strLinkID
,cnnLinkTracker
Else
rsLinkTrackerMod.Open "Exec updateLinkTracker " & strLinkID
,cnnLinkTracker
End If

' Close our recordset objects
rsGetLink.Close
Set rsGetLink = Nothing
rsLinkTrackerMod.Close
Set rsLinkTrackerMod = Nothing
rsLinkTracker.Close
Set rsLinkTracker = Nothing

' Kill our connection
cnnLinkTracker.Close
Set cnnLinkTracker = Nothing
End If
Else
'Set default link target
strLinkName = "nolink.asp"
End If
'Redirect to target link
Response.Redirect strLinkName
%>

-----------------CODE-----------------------
Dec 8 '05 #1
1 1392
Gary wrote:
I'm fairly new to ASP and have attempted to create a link tracker
using SQL Stored Procedures. The procedures work but my script
timesout when calling them through ASP

<snip>

My first step would be to use SQL Profiler to trace what is happening on the
SQL Server while this page is running. You can even add the Stored Procedure
events to the trace to see the line-by-line execution of your procedures.

If that does not help you find the bottleneck, then you are going to have to
use some response.write statements to figure out which statement is causing
the timeout. Something like:
Response.Write "About to execute ""Exec getLink " & _
strLinkID & """<BR>"
rsGetLink.Open "Exec getLink " & strLinkID ,cnnLinkTracker
Response.Write "Successfully executed ""Exec getLink " & _
strLinkID & """<BR>"

Turn off Response.Buffer so you can see the results of the response.writes.
If that does not work, you'll have to use Response.End statements to see the
results.

HTH,
Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Dec 8 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Silver | last post by:
I have a perl script running on machine A, a web server. A visitor completes certain pieces of data and these are compiled into two emails, one addressed to the visitor and copied to the site...
8
by: Mathieu Blais | last post by:
Hi, I need to capture the Script timeout error if that is possible. I know I can increase the timeout value in the server settings or in the scripts itself but I really want to make sure that no...
6
by: Randy Weber | last post by:
I occasionally am getting a script timeout while using an ASP database connection. Everything I read suggests that I can change the Server.ScriptTimeout to address this, but I was unable to find...
0
by: SPD | last post by:
I've been researching this issue with little luck. Here's the situation: We have a few users on slow dialup connections who are posting data from forms. Frequently, they get script timeout...
13
by: Patrick | last post by:
I understand that with IIS5.1 on Windows XP Professional SP1, I can 1) Either set under IIS Manager-> Any specific Virtual Directory-> Configuration->Options->ASP Script timeout for all pages...
11
by: www.MessageMazes.com | last post by:
I sometimes get this error after about 60 seconds of "waiting for mazes.com" (but when the page works, it usually loads in less than 12 seconds). > Active Server Pages error 'ASP 0113' > Script...
0
by: Frederic Wenzel | last post by:
I wrote a script on Linux that uses pyserial to read status messages from a serial line using readlines(). For now, it just displays what it gets on stdout: 17:42 | 0005 | 02 | | 5 |Rack...
8
by: michal | last post by:
hi guys, i was wondering how you deal with script timeouts caused by huge file uploads. Lets say I have a script timeout of 2 minutes and the user uploads a file which takes more than this ......
15
by: Mikhail Kovalev | last post by:
Fatal error: Maximum execution time of 3600 seconds exceeded in z:\home \localhost\www\somefile.php on line 138 php.ini setting fixes default max execution time at 30 sec, In the script itself I...
5
by: This | last post by:
I have a pretty basic emailing script that sends a relatively small number (150) of html emails. The emails are compiled, personalised from a mysql db subscribers list, and sent using mail() -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.