Newbie, connection timing out problem

V

verci

Hi, sorry if this seems stupid :(


I'm running WindowsXP, Asp.net 1.1 and Sql Server 2000 , the problem is the
my pages are timing randomly, I use a ODBC connection to the database in
the global.asa file (below), the problem is that my pages some times work
right and some times they time out, but it is sporadically, can anybody help
me?

<SCRIPT LANGUAGE=VBScript RUNAT=Server>

'EventName Description
'Session_OnStart Runs the first time a user runs any page in your
application
'Session_OnEnd Runs when a user's session times out or quits your
application
'Application_OnStart Runs once when the first page of your application is
run for the first time by any user
'Application_OnEnd Runs once when the web server shuts down

Sub Application_OnStart
Application("strConnectString") =
"DSN=WorkDB;Database=EspecialDB;UID=sa;PWD=!*bman~;"
End Sub

</SCRIPT>

And do my work on the database using ADO.net to execute some stored
procedures in my database with the following code:

dim strQuery
dim dateRS
dim objConn, Cmd

set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionTimeout = 0
objConn.Open Application("strConnectString")
strQuery = "TimeFrame"
Set dateRS = objConn.Execute(strQuery)



Regards
 
V

verci

Hi
It is old ADO, the company I work for has an old or original ASP system
that needs maintenance and god only knows who was the original programmer,
maybe in the near future I can fight to covert the whole app to asp.net,
sorry about that snafu regardig asp.net 1.1 my bad!, ok now that we got
things clear, regarding the time out issues that we are experiencing what
are your thoughts? I need to stick to the actual programming style (for now)
 
B

Bob Barrows [MVP]

Let's start with the connection string: just because it is "old" (most of us
prefer the term "classic" <g>) ASP/ADO does not mean you are restricted to
using the antiquated ODBC DSN. See http://www.aspfaq.com/show.asp?id=2126

That said, there are many potential causes for this synptom, ranging from
hardware failure (sporadically malfunctioning network card), network failure
(WINS or DNS failures), to poor programming practices.

For the hardware/network issues, there is a KB article at
support.microsoft.com that discusses troubleshooting connection problems
between IIS and SQL Server. I don't have time to look for it right now (it
will be a good exercise of your research skills). If you can't find it, I
thnk there is a link to it somewhere in this article:
http://www.aspfaq.com/show.asp?id=2009


For the programming practices problems: was the developer scrupulous when it
comes to closing connections when they are not needed? Was the developer
scrupulous about always using explicit connection objects in his code,
rather than implicit connections?

connection failures caused by pooling disablement
http://support.microsoft.com/default.aspx?scid=kb;en-us;328476

implicit connections:
http://support.microsoft.com/?kbid=271128


Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top