Re: ADO Connection object in Session_OnEnd

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 09/24/04


Date: Fri, 24 Sep 2004 09:25:58 -0400

Agoston Bejo wrote:
> Hi!
> Why doesn't the following code work?
>
> Sub Session_OnEnd
> Dim Conn
> Set Conn = Server.CreateObject("ADODB.Connection")
> Conn.ConnectionString = Application("Connection_String")
> Conn.Open 'here is the error

What is the error? I suggest instead of posting it here, you go to
aspfaq.com and search for it there. You may get your answer quicker.

> ...
> End Sub
>
>
> A Conn object is created the same way in Session_OnStart and is used
> throughout the application, and Application("Connection_String") still
> exists here (I tested).

http://www.aspfaq.com/2053

> So I suppose the error is caused by the fact that we are in
> Session_OnEnd.

Who can say without knowing what the error is?

Bob Barrows

-- 
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM" 


Relevant Pages