VBA - Automatic ODBC Logon

  • Thread starter Thread starter Jason Gyetko
  • Start date Start date
J

Jason Gyetko

I'm opening a report from within a module (Access 2000). This report calls
a query which is getting data from an ODBC datasource. How can I
programmically logon to this datasource so that I do not get prompted for a
password every time the database is opened? Thanks.
 
Jason Gyetko said:
I'm opening a report from within a module (Access 2000). This report calls
a query which is getting data from an ODBC datasource. How can I
programmically logon to this datasource so that I do not get prompted for a
password every time the database is opened? Thanks.
We had a similar issue with our application, Access 2000 front end, SQL
Server 2000 back end.
We have a table in the front end that stores the connection information -
database name, name of DSN, User ID, and password.
This information is used to connect the SQL Server database tables
initially - the first time the front end is run on a workstation.
Then each time the front end is opened, code runs to disconnect one of the
linked tables and then reconnect it using the same connection information.
Once the connection is reestablished for one table, it is open for all of
the linked tables.
Hope this helps.
 
Back
Top