database - Manually Close ODBC DSN Connection -
i have ms access database connects database via user level dns odbc data source.
when connection first initiated odbc driver prompt me username , password. database connects on server dependent on username use.
once connection established access retain / keep alive until close access database.
is there way force access close open odbc connections, requiring me provide login credentials again when next try access object on server. want able switch database odbc connection accessing without having close access , re-open database.
two things:
1) can make process of closing , re-opening access painless possible users doing:
' close , restart shell "restart.bat", vbnormalfocus application.quit
with restart.bat consisting of like
rem wait access close timeout 3 rem actual command line goes here msaccess.exe mydatabase.mdb
2) mentioned:
what want able switch database odbc connection accessing
the link posted gave me idea:
any subsequent odbc objects happen match on 3 parameters—odbc driver, server, , database—will reuse cached connection.
if switch linked tables user dsn dsn-less connections, desired behaviour should happen automatically.
change .connect string of tables altering "database=..." part, , access should ask credentials when table accessed next time.
Comments
Post a Comment