Home All Groups Group Topic Archive Search About
Author
6 Jan 2006 5:18 PM
Steve
Is it possible to detect or more importantly allow the app to continue to
work with sql server after it has been restarted.

I imagine my users to have this app open all day but don't want them all to
restart the app if the server is restarted.

At the moment the situation is:-

    * SQL server ok, App works.
    * Sql Server stopped - App doesn't work (as expected) with error
handling leaving the app in a try again later state so they don't lose the
data entered on the current form.
    * Sql Server Restarted - app still doesn't work! I'd like it to just
reconnect to stop me from getting punched by angry users!

Thanks in advance for any ideas.

Steve.

Author
6 Jan 2006 5:40 PM
Steve
No worries,  I just call the Dispose on the connection object.  Set a flag
on sql server errors, then next time an sql action is required I recreate
the connection.  Codes a bit scrappy but the general idea should work.  I
think.

Steve.

Show quote
"Steve" <steve_tur***@lineone.net> wrote in message
news:uym%23oTuEGHA.1240@TK2MSFTNGP09.phx.gbl...
> Is it possible to detect or more importantly allow the app to continue to
> work with sql server after it has been restarted.
>
> I imagine my users to have this app open all day but don't want them all
to
> restart the app if the server is restarted.
>
> At the moment the situation is:-
>
>     * SQL server ok, App works.
>     * Sql Server stopped - App doesn't work (as expected) with error
> handling leaving the app in a try again later state so they don't lose the
> data entered on the current form.
>     * Sql Server Restarted - app still doesn't work! I'd like it to just
> reconnect to stop me from getting punched by angry users!
>
> Thanks in advance for any ideas.
>
> Steve.
>
>
Author
8 Jan 2006 1:41 AM
Robbe Morris [C# MVP]
Yes, you should be closing the connection immediately after
ever call.  Leaving a single connection open and reused
for the app is not recommended unless the connection
time to your sql server is incredibly slow due to
network issues.

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.eggheadcafe.com/forums/merit.asp





Show quote
"Steve" <steve_tur***@lineone.net> wrote in message
news:u28fOguEGHA.648@TK2MSFTNGP14.phx.gbl...
> No worries,  I just call the Dispose on the connection object.  Set a flag
> on sql server errors, then next time an sql action is required I recreate
> the connection.  Codes a bit scrappy but the general idea should work.  I
> think.
>
> Steve.
>
> "Steve" <steve_tur***@lineone.net> wrote in message
> news:uym%23oTuEGHA.1240@TK2MSFTNGP09.phx.gbl...
>> Is it possible to detect or more importantly allow the app to continue to
>> work with sql server after it has been restarted.
>>
>> I imagine my users to have this app open all day but don't want them all
> to
>> restart the app if the server is restarted.
>>
>> At the moment the situation is:-
>>
>>     * SQL server ok, App works.
>>     * Sql Server stopped - App doesn't work (as expected) with error
>> handling leaving the app in a try again later state so they don't lose
>> the
>> data entered on the current form.
>>     * Sql Server Restarted - app still doesn't work! I'd like it to just
>> reconnect to stop me from getting punched by angry users!
>>
>> Thanks in advance for any ideas.
>>
>> Steve.
>>
>>
>
>

AddThis Social Bookmark Button