C
Candyman
I have a probgram that works great. I connect to a Db and run querries, but
I canceled from the final connection today (instead of puting in the db
password, I hit CANCEL) and my code stopped. It jammed on the EXECUTE
statement below. How do I either test the connection to make sure it is in
tact? I will exit the sub if no connection found.
Current working code:
Set MyQDF = MyDB.CreateQueryDef("")
MyQDF.ODBCTimeout = 800
MyQDF.Connect = "ODBC;DSN=OTHER_DB"
MyQDF.ReturnsRecords = False
'Delete Curr Transactions
stSQL = stSQL & "DELETE FROM work1.CUSTOMERS; "
MyQDF.SQL = stSQL
MyQDF.Execute
I canceled from the final connection today (instead of puting in the db
password, I hit CANCEL) and my code stopped. It jammed on the EXECUTE
statement below. How do I either test the connection to make sure it is in
tact? I will exit the sub if no connection found.
Current working code:
Set MyQDF = MyDB.CreateQueryDef("")
MyQDF.ODBCTimeout = 800
MyQDF.Connect = "ODBC;DSN=OTHER_DB"
MyQDF.ReturnsRecords = False
'Delete Curr Transactions
stSQL = stSQL & "DELETE FROM work1.CUSTOMERS; "
MyQDF.SQL = stSQL
MyQDF.Execute