PC Review


Reply
Thread Tools Rate Thread

Check to ensure server and db available

 
 
Earl
Guest
Posts: n/a
 
      30th Jul 2005
When I load the startup form, I want to make a check to ensure the named
server AND database (SQL2k) is available before trying to load any data. Any
recommendations?


 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      30th Jul 2005
Try a connect (embedded in try/catch block).

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

"Earl" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When I load the startup form, I want to make a check to ensure the named
> server AND database (SQL2k) is available before trying to load any data.
> Any recommendations?
>



 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      30th Jul 2005
..... configure and instantiate connection object...

Try
connection.open()
Catch ex As Exception
'Handle inability to open connection here
Finally
connection.close()
End Try


"Earl" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When I load the startup form, I want to make a check to ensure the named
> server AND database (SQL2k) is available before trying to load any data.
> Any recommendations?
>



 
Reply With Quote
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      30th Jul 2005
The 2.0 Framework has a number of new "factory" classes and service classes
that make this easy. I'll be showing those at VSLive in Orlando in October.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
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.
__________________________________

"Earl" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When I load the startup form, I want to make a check to ensure the named
> server AND database (SQL2k) is available before trying to load any data.
> Any recommendations?
>



 
Reply With Quote
 
Earl
Guest
Posts: n/a
 
      2nd Aug 2005
Thanks for the thoughts guys. Just thought maybe there was something more
elegant than capturing an exception :=)

Oh, and when are we to see 2.0 Bill?

"William (Bill) Vaughn" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The 2.0 Framework has a number of new "factory" classes and service
> classes that make this easy. I'll be showing those at VSLive in Orlando in
> October.
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> 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.
> __________________________________
>
> "Earl" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> When I load the startup form, I want to make a check to ensure the named
>> server AND database (SQL2k) is available before trying to load any data.
>> Any recommendations?
>>

>
>



 
Reply With Quote
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      2nd Aug 2005
You can work with it now. The CTPs are fairly stable and good enough to
start building and testing applications for delivery in 2006.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
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.
__________________________________

"Earl" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Thanks for the thoughts guys. Just thought maybe there was something more
> elegant than capturing an exception :=)
>
> Oh, and when are we to see 2.0 Bill?
>
> "William (Bill) Vaughn" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> The 2.0 Framework has a number of new "factory" classes and service
>> classes that make this easy. I'll be showing those at VSLive in Orlando
>> in October.
>>
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> 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.
>> __________________________________
>>
>> "Earl" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> When I load the startup form, I want to make a check to ensure the named
>>> server AND database (SQL2k) is available before trying to load any data.
>>> Any recommendations?
>>>

>>
>>

>
>



 
Reply With Quote
 
Earl
Guest
Posts: n/a
 
      2nd Aug 2005
Will do. I actually meant to write that as "... 2.0, Bill", but figured I
might get a response out of "...2.0 Bill" also. =)

"William (Bill) Vaughn" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You can work with it now. The CTPs are fairly stable and good enough to
> start building and testing applications for delivery in 2006.
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> 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.
> __________________________________
>
> "Earl" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Thanks for the thoughts guys. Just thought maybe there was something more
>> elegant than capturing an exception :=)
>>
>> Oh, and when are we to see 2.0 Bill?
>>
>> "William (Bill) Vaughn" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> The 2.0 Framework has a number of new "factory" classes and service
>>> classes that make this easy. I'll be showing those at VSLive in Orlando
>>> in October.
>>>
>>> --
>>> ____________________________________
>>> William (Bill) Vaughn
>>> Author, Mentor, Consultant
>>> Microsoft MVP
>>> 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.
>>> __________________________________
>>>
>>> "Earl" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> When I load the startup form, I want to make a check to ensure the
>>>> named server AND database (SQL2k) is available before trying to load
>>>> any data. Any recommendations?
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Earl
Guest
Posts: n/a
 
      12th Aug 2005
You have a recommendation on which event to fire this in? Obviously, I could
do the check when a user presses a button, but I'd much rather do it while
the form is loading. I've experimented a bit with this and none of the Form
events seem appropriate.

"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:(E-Mail Removed)...
> Try a connect (embedded in try/catch block).
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
> SLODUG - Slovene Developer Users Group www.codezone-si.info
>
> "Earl" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> When I load the startup form, I want to make a check to ensure the named
>> server AND database (SQL2k) is available before trying to load any data.
>> Any recommendations?
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to ensure the message stays on the server drdeez Microsoft Outlook Discussion 1 19th Jan 2008 06:23 PM
Check location of current db to ensure it is not a copy =?Utf-8?B?TmljZWFjdGlvbg==?= Microsoft Access Security 1 9th Aug 2007 12:54 PM
check to ensure all files in folder =?Utf-8?B?U2FyYWg=?= Microsoft Excel Programming 2 15th Jun 2007 12:50 PM
How do I ensure that I always get the Page_Load event (but not have to reload images from the server)? Joergen Bech Microsoft ASP .NET 0 25th Jul 2005 09:32 AM
Error code when attempting to upload - Ensure FP Server Extensions are installed Heath Microsoft Frontpage 2 19th Jan 2004 08:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:24 AM.