Re: A TOUGH ONE - audit Login, Audit Logout connection
From: Zach Wells (no_zwells_spam_at_ain1.com)
Date: 04/28/04
- Next message: Max: "Execute SQL commands in context of another active connection or howto IS_MEMBER for another connected user?"
- Previous message: joe: "Re: Granting EXEC to all my user sprocs in one hit"
- In reply to: Phil Smith: "A TOUGH ONE - audit Login, Audit Logout connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 28 Apr 2004 11:22:33 -0400
Phil Smith wrote:
> Hi all:
>
>
> Hope you can shed some light on this. we have a Vb6 app connecting to
> a slq server database using ado 2.6. when each client is started they
> initialize a connection object which is kept open for the life cycle
> of the client (i know this not recommended but it is an inherited
> problem).
>
> Our site was reporting errors which were attributed to loss of client
> connection to the server. As we still haven't found a clear way of
> alerting the client when it has loosed its connection to the server
> ((1)if anyone has a suggestion let me know)- the Recordset.state
> property and Recordset events are useless for this.
>
> Our solution for this was - when ever we pass the connection object
> to a recorded, internal to the connection object we test the
> connection to the server by executing a "Select @@Version" on the
> server using a prepared command object. if this test fails then we try
> re-establish the connection , which is looped on the
> connection.timeout. so the user has the choice to reconnect or exit
> the app.
If you took the time to create the workaround of "select @@version", why
don't you just change the code to create a connection object as
necessary instead of relying on the global one?
Zach
- Next message: Max: "Execute SQL commands in context of another active connection or howto IS_MEMBER for another connected user?"
- Previous message: joe: "Re: Granting EXEC to all my user sprocs in one hit"
- In reply to: Phil Smith: "A TOUGH ONE - audit Login, Audit Logout connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|