How To Bypass Login Prompt When Opening Linked Table

G

Guga Zaima

Hi folks!

I have been trying to migrate an Access 97 database to an SQL Server 2000,
but I have been dealing with problems related to linked tables.

Basically I have an Access database and an Access MDE accessing it. I
migrated all access 97's data to an SQL Server and I tryed to change MDE's
linked tables from the old Access database to the new SQL Server tables
through an ODBC connection. However, everytime a form tries to access linked
table's data I have to fill a login prompt window with SQL Server's login and
password. Is there, by any chance, some sort of way to provide login and
password programmatically?

I tryed to insert some sort of code into form's load event, however, I
noticed the login prompt appears before the code´s execution. Therefore I
concluded when a form's data origin is a linked table, access tries to
restore the link even before the form's opening. Is it true?


Thanks a lot!
 
G

Guest

You can use 'windows login security' instead of 'SQL Server
authentication'.

You can login to access with access security, and use 'SQL
Server authentication' with no password (last I looked, Access
automatically tries to login to sql server using the access login)

You can use an unbound form to do the re-link. The only reason
you are getting a SQL Server connection dialog is because you
are trying to connect to SQL Server.

Bound Forms connect to data between the Open and Load events.
The form is not displayed until after the data has been retrieved.
Subforms connect to data before the main form Open and Load
events.

You should only get one connection dialog, not 'every time a form
tries to access linked tables'. If you get more than one connection
dialog, you should re-link your tables. Some of the linked tables
probably have different connection strings.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top