473,507 Members | 3,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to find the active connection string

137 New Member
i have two databases for a single software in two different servers. i want to connect to the active server. if one server is down then it should automatically connect to another server. how to find out which one is active which is not ?
i have used postgres database and vb6.
Apr 3 '12 #1
3 1866
debasisdas
8,127 Recognized Expert Expert
Try to open the 1st database, if it is not accessible try to open the 2nd database.
Apr 6 '12 #2
coolminded
137 New Member
thank you debasisdas for your answer. but how to know that the database is inaccessible. because it will show the error message with "connection error" when the database is not accessible.
thank you
Apr 15 '12 #3
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Use Error Handler... First Open Conn to First server, If it opens without error, Exit Sub... OR Else try to Open Conn to second server..

Regards
Veena
Apr 18 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
55650
by: kant | last post by:
stringA= "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;PWD=password;Initial Catalog=DB;Data Source=127.0.0.1;Connect Timeout=30" stringB = "Provider=Microsoft.Jet.OLEDB.4.0; Data...
1
2268
by: Duncan Winn | last post by:
I am trying to connect to an INTRBASE database through the MS OleDb.NET provider, however I am unsure of what to use for the connection string. How can I find this out???
12
3447
by: Charlie | last post by:
Hi: My host will not allow me use a trusted connection or make registry setting, so I'm stuck trying find a way to hide connection string which will be stored in web.config file. If I encrypt...
2
4691
by: Naveen | last post by:
Hi All, I have developed an application in ASP.NET and everything went fine till i found a need to use Crystal Reports, after surfing I found that Crystal Reports can only be used when I have a...
1
4868
by: james | last post by:
I am creating an connection string at runtime using decryption (crypto libraries). i have a very unpridictable error while assinging the generated connection string to the connection property. ...
3
8321
by: John | last post by:
Hi I have a dataset from a web service. I want to use a dataadapter with the dataset. What connection string should I use so the da knows that it is acting on the remote db associated with the...
0
1323
by: christophe.leroquais | last post by:
Hello, i can't find the connection string (and the def of the options) to access a flat file from SQL Server 2005. I guess it is something like: Provider=Microsoft.Jet.OLEDB.4.0; Data...
1
6038
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
1
1266
by: kmcq | last post by:
I've contacted my host and they have no idea what connection string I need to use to access the MS SQL database we have running on their equipment. I'm trying to connection from ASP using OLE. ...
3
3055
by: Jiwei06xie | last post by:
Dear expert, I got two forms. form1: Combox form Form_rptStock (key field: serial number), with one command button. form2: Entryform Entryform_stock, with a series of command buttons. I use...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7110
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.