Re: ADO Connection object in Session_OnEnd

From: Roji. P. Thomas (lazydragon_at_nowhere.com)
Date: 09/24/04


Date: Fri, 24 Sep 2004 18:54:07 +0530


>A Conn object is created the same way in Session_OnStart and is used
>throughout the application

O, Boy thats a bad idea

-- 
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Agoston Bejo" <gusz1@freemail.hu> wrote in message
news:OOX4xijoEHA.2764@TK2MSFTNGP11.phx.gbl...
> 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
> ...
> 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).
> So I suppose the error is caused by the fact that we are in Session_OnEnd.
>
>


Relevant Pages

  • Re: ADO Connection object in Session_OnEnd
    ... P. Thomas ... Net Asset Management ... > Sub Session_OnEnd ... > A Conn object is created the same way in Session_OnStart and is used ...
    (microsoft.public.scripting.vbscript)
  • Re: ADO Connection object in Session_OnEnd
    ... P. Thomas ... Net Asset Management ... > Sub Session_OnEnd ... > A Conn object is created the same way in Session_OnStart and is used ...
    (microsoft.public.inetserver.asp.db)
  • Re: ADO Connection object in Session_OnEnd
    ... P. Thomas ... Net Asset Management ... > Sub Session_OnEnd ... > A Conn object is created the same way in Session_OnStart and is used ...
    (microsoft.public.inetserver.asp.general)
  • Re: Record count
    ... 'conn.Close: Set conn = Nothing ... Perhaps you are doing something with that conn object in the other sub? ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)