reconnect passthrough queries

focus10

Registered User.
Local time
Today, 08:40
Joined
Mar 8, 2009
Messages
38
my access application is connected to an sql db with odbc
the connection to the sqlserver is through the internet
while internet is ok everything is ok but if internet fail's for a while all
passthrough queries loss connection.
how can i reconnect without closing opening the application ?

thank's ahead
 
I have had problem using passthrough queries as well, but not over the internet.

Have you tried:

Dim db as database
Dim qdf as querydef

Set db = currentdb
Set qdf = currentdb.querydefs("myquery")
qdf.connect = "ODBC;Driver=MyDriver;Persist Security Info=False;UID=User;PWD=password")
' these should be your connection information, username and passwords for the
'particular ODBC driver. It can drive you potty trying different combinations if your
' ODBC driver is not well documented.
qdf.close
db.close
DoCmd.OpenQuery "myquery", acViewNormal
 

Users who are viewing this thread

Back
Top Bottom