Using VS 2005, I created data adapters using the IDE. I store a
connection object in My.Settings (cool feature) collection. What I'd
like to do is seemlessly changed my connection on the fly. Say for
instance the production server is down due to network or server hang,
the applicaiton should start writing to its own instance of SQL
server. I wanted to use the StatusChanged event but its not firing on
the Fill method. Each time I instantiate my adapter in a routine, I
set the connection to the one in My.Settings because the connection
might be different (local, production, development). It was firing at
one time but hasn't done it since. Don't know what I did to deserve
that. Any help would be greatly appreciated

Thanks in advance,

Ryan

Re: SqlConnection error handling by Brooke

Brooke
Tue May 22 09:24:39 CDT 2007

I would catch the exception thrown from the first server timing out, and
then change the connection to the local and try to connect again. Watch for
an exception and show message to user if the second fails.


"Ryan" <rchill81@gmail.com> wrote in message
news:1179772371.960943.43260@x35g2000prf.googlegroups.com...
> Using VS 2005, I created data adapters using the IDE. I store a
> connection object in My.Settings (cool feature) collection. What I'd
> like to do is seemlessly changed my connection on the fly. Say for
> instance the production server is down due to network or server hang,
> the applicaiton should start writing to its own instance of SQL
> server. I wanted to use the StatusChanged event but its not firing on
> the Fill method. Each time I instantiate my adapter in a routine, I
> set the connection to the one in My.Settings because the connection
> might be different (local, production, development). It was firing at
> one time but hasn't done it since. Don't know what I did to deserve
> that. Any help would be greatly appreciated
>
> Thanks in advance,
>
> Ryan
>
>



Re: SqlConnection error handling by William

William
Tue May 22 09:44:01 CDT 2007

Investigate SQL Server 2005 Failover Partner.
http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/implappfailover.mspx

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"Brooke" <tbrooked@hotmail.com> wrote in message
news:%23t2HwzHnHHA.2076@TK2MSFTNGP06.phx.gbl...
>I would catch the exception thrown from the first server timing out, and
>then change the connection to the local and try to connect again. Watch
>for an exception and show message to user if the second fails.
>
>
> "Ryan" <rchill81@gmail.com> wrote in message
> news:1179772371.960943.43260@x35g2000prf.googlegroups.com...
>> Using VS 2005, I created data adapters using the IDE. I store a
>> connection object in My.Settings (cool feature) collection. What I'd
>> like to do is seemlessly changed my connection on the fly. Say for
>> instance the production server is down due to network or server hang,
>> the applicaiton should start writing to its own instance of SQL
>> server. I wanted to use the StatusChanged event but its not firing on
>> the Fill method. Each time I instantiate my adapter in a routine, I
>> set the connection to the one in My.Settings because the connection
>> might be different (local, production, development). It was firing at
>> one time but hasn't done it since. Don't know what I did to deserve
>> that. Any help would be greatly appreciated
>>
>> Thanks in advance,
>>
>> Ryan
>>
>>
>
>



Re: SqlConnection error handling by Ryan

Ryan
Wed May 23 08:22:13 CDT 2007

On May 22, 10:44 am, "William \(Bill\) Vaughn"
<billvaRemoveT...@betav.com> wrote:
> Investigate SQL Server 2005 Failover Partner.http://www.microsoft.com/tec=
hnet/prodtechnol/sql/bestpractice/implapp...
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speakerwww.betav.com/blog/billvawww.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no right=
s=2E
> __________________________________
> Visitwww.hitchhikerguides.netto get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> -------------------------------------------------------------------------=
--=AD--------------------------------------------
>
> "Brooke" <tbroo...@hotmail.com> wrote in message
>
> news:%23t2HwzHnHHA.2076@TK2MSFTNGP06.phx.gbl...
>
>
>
> >I would catch the exception thrown from the first server timing out, and
> >then change the connection to the local and try to connect again. Watch
> >for an exception and show message to user if the second fails.
>
> > "Ryan" <rchil...@gmail.com> wrote in message
> >news:1179772371.960943.43260@x35g2000prf.googlegroups.com...
> >> Using VS 2005, I created data adapters using the IDE. I store a
> >> connection object in My.Settings (cool feature) collection. What I'd
> >> like to do is seemlessly changed my connection on the fly. Say for
> >> instance the production server is down due to network or server hang,
> >> the applicaiton should start writing to its own instance of SQL
> >> server. I wanted to use the StatusChanged event but its not firing on
> >> the Fill method. Each time I instantiate my adapter in a routine, I
> >> set the connection to the one in My.Settings because the connection
> >> might be different (local, production, development). It was firing at
> >> one time but hasn't done it since. Don't know what I did to deserve
> >> that. Any help would be greatly appreciated
>
> >> Thanks in advance,
>
> >> Ryan- Hide quoted text -
>
> - Show quoted text -

Bill,

Is the database mirror failover only isolated to SQL 2005 instances or
is it part of the 2.0 framework? I see its provider based but would
this work with SQL 2000 instances?


Re: SqlConnection error handling by William

William
Wed May 23 12:20:04 CDT 2007

This is tightly coupled and implemented by SQL Server 2005 (SP1). Nope, it
does not work with 2000.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"Ryan" <rchill81@gmail.com> wrote in message
news:1179926533.586992.68560@p77g2000hsh.googlegroups.com...
On May 22, 10:44 am, "William \(Bill\) Vaughn"
<billvaRemoveT...@betav.com> wrote:
> Investigate SQL Server 2005 Failover
> Partner.http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/implapp...
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speakerwww.betav.com/blog/billvawww.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visitwww.hitchhikerguides.netto get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ---------------------------------------------------------------------------­--------------------------------------------
>
> "Brooke" <tbroo...@hotmail.com> wrote in message
>
> news:%23t2HwzHnHHA.2076@TK2MSFTNGP06.phx.gbl...
>
>
>
> >I would catch the exception thrown from the first server timing out, and
> >then change the connection to the local and try to connect again. Watch
> >for an exception and show message to user if the second fails.
>
> > "Ryan" <rchil...@gmail.com> wrote in message
> >news:1179772371.960943.43260@x35g2000prf.googlegroups.com...
> >> Using VS 2005, I created data adapters using the IDE. I store a
> >> connection object in My.Settings (cool feature) collection. What I'd
> >> like to do is seemlessly changed my connection on the fly. Say for
> >> instance the production server is down due to network or server hang,
> >> the applicaiton should start writing to its own instance of SQL
> >> server. I wanted to use the StatusChanged event but its not firing on
> >> the Fill method. Each time I instantiate my adapter in a routine, I
> >> set the connection to the one in My.Settings because the connection
> >> might be different (local, production, development). It was firing at
> >> one time but hasn't done it since. Don't know what I did to deserve
> >> that. Any help would be greatly appreciated
>
> >> Thanks in advance,
>
> >> Ryan- Hide quoted text -
>
> - Show quoted text -

Bill,

Is the database mirror failover only isolated to SQL 2005 instances or
is it part of the 2.0 framework? I see its provider based but would
this work with SQL 2000 instances?