Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Connection Loop until 1

Status
Not open for further replies.

Trudye

Programmer
Sep 4, 2001
932
US
Hey Guys,
How do I loop until I can establish an ODBC connection? What should my test/Contional criteria be?

if Condition then
Go to LoopRound
else
sConnect = "ODBC;DSN=S_22;DBQ=DSP01;UID=usersmm;PWD=gone;
ASY=OFF;DATABASE="
Endif

Thanx much,
Trudye
 
Try puttin the connection string into a connection and testing the connection state.
 
What are you going to do with the connection string when you make a connection?
 

Process normally. I just want to loop until a connection can be made.

 
OK, here is a test to see if you made a connection, does this help?

dim conn as connection
Dim sConnect As String

sConnect = "ODBC;DSN=S_22;DBQ=DSP01;UID=usersmm;PWD=gone;
ASY=OFF;DATABASE="

conn.Open sConnect
If (conn.State = adStateOpen) Then
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top