rio
Registered User.
- Local time
- Today, 10:20
- Joined
- Jun 3, 2008
- Messages
- 124
hi.. i got a problem with my database. i used odbc connection using oracle. sometime there is no connection.
i used this code to open the connection.
Is there a way that i can set this command to run only if there is a network connection. if no connection it dont run.
Please someone help me..
i used this code to open the connection.
Code:
Private Sub Form_Open(Cancel As Integer)
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb()
Set tdf = db.TableDefs("TEST")
tdf.Connect = "ODBC;DSN=PS-TEST;UID=" & UserName & ";PWD=" & PSWD & " ;driver={Microsoft ODBC for Oracle};server=PS-TEST;"
tdf.RefreshLink
DoCmd.SetWarnings False
End Sub
Is there a way that i can set this command to run only if there is a network connection. if no connection it dont run.
Please someone help me..