how to check database is available before open the connection?
-
hello friend how to check database is available before open the connection object? Please help me. Thanks
Piyush Vardhan Singh p_vardhan14@rediffmail.com Eventure Technology http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com
-
hello friend how to check database is available before open the connection object? Please help me. Thanks
Piyush Vardhan Singh p_vardhan14@rediffmail.com Eventure Technology http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com
How do you mean by
Piyush Vardhan Singh wrote:
how to check database is available
Do you mean checking if exists database before open it? If yes then try this query
select * From sysdatabases where [name]='yourdbname'
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
-
hello friend how to check database is available before open the connection object? Please help me. Thanks
Piyush Vardhan Singh p_vardhan14@rediffmail.com Eventure Technology http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com
Piyush Vardhan Singh wrote:
how to check database is available before open the connection object?
So you want to make sure database exist or not with out connecting the database? :doh:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
Piyush Vardhan Singh wrote:
how to check database is available before open the connection object?
So you want to make sure database exist or not with out connecting the database? :doh:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
thanks for reply i want to avoid network failures error.when network is not available. so i want check database is available before open the connection object
Piyush Vardhan Singh p_vardhan14@rediffmail.com Eventure Technology http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com
-
thanks for reply i want to avoid network failures error.when network is not available. so i want check database is available before open the connection object
Piyush Vardhan Singh p_vardhan14@rediffmail.com Eventure Technology http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com
Piyush Vardhan Singh wrote:
want to avoid network failures error.when network is not available.
You have to taking care of
Connection Time out
For this . If the connection is not available you will get an Timeout Excepation :-DAbhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
Piyush Vardhan Singh wrote:
want to avoid network failures error.when network is not available.
You have to taking care of
Connection Time out
For this . If the connection is not available you will get an Timeout Excepation :-DAbhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
YES but i want to handle this without error?
Piyush Vardhan Singh p_vardhan14@rediffmail.com Eventure Technology http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com