I have MDB database linked to SQL SERVER through VPN connection...
I created links to the sql server ..
Links are dsnless...
Everything works fine but when I lost VPN connection or sql connection has been broken I can't refresh links to the tables.
I receive message 3146 sql connection failed
I must close database and start again...
I tried different methods like ado,dao, and vba docmd.transferdatabase,aclink... but no success, table cant be relinked...
Only way I can relink is to change ip adress in conn.string
eg 192.124.0.2(1st ip- router server ip) and after connection failed i can use 192.124.0.32(2nd ip - server local ip) and and that's it
if i lost connection for the 3rd time... i must restart application
it seems that access database keep the previous connection..
Any idea how to reset or drop database connection to the sql server and refresh links to the tables with vba code without closing access database...
I created links to the sql server ..
Links are dsnless...
Everything works fine but when I lost VPN connection or sql connection has been broken I can't refresh links to the tables.
I receive message 3146 sql connection failed
I must close database and start again...
I tried different methods like ado,dao, and vba docmd.transferdatabase,aclink... but no success, table cant be relinked...
Only way I can relink is to change ip adress in conn.string
eg 192.124.0.2(1st ip- router server ip) and after connection failed i can use 192.124.0.32(2nd ip - server local ip) and and that's it
if i lost connection for the 3rd time... i must restart application
it seems that access database keep the previous connection..
Any idea how to reset or drop database connection to the sql server and refresh links to the tables with vba code without closing access database...