By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,671 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,671 IT Pros & Developers. It's quick & easy.

Automatically Link Tables on Database Opening?

P: 7
Hi,
I've linked several tables from a SQL 2000 server, and used there data to create Pivot tables on my load form. this works fine. However when i added a form that shows tables info in list boxes (using queries) it asks for a user name and password every time the database is opened.
Is there anyway i could give these details automatically, i've tried opening a connection on load and i've tried looping through each table giving the connection string and refreshing the link.

Any help at all would be greatly appreciated
Thanks
Feb 27 '07 #1
Share this Question
Share on Google+
6 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
When linking to SQL Server tables use an odbc link. If you have already done so try doing it again. Once the username and password is given once it shouldn't ask for it again.

Mary
Feb 27 '07 #2

P: 7
I am using a ODBC link, however its on the initial opening of the Database that i want to be able to give the password automatically to the SQL server login, once open it run's fine. Sorry if i was'nt being clear enough (first post and all)
Thank for the reply
Feb 28 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
I am using a ODBC link, however its on the initial opening of the Database that i want to be able to give the password automatically to the SQL server login, once open it run's fine. Sorry if i was'nt being clear enough (first post and all)
Thank for the reply
OK this is a little confusing. The password should be hard coded into the linked tables. Open one of the tables in design view and then open the properties window. Under the description property you should see something like the following:

ODBC;DSN=DSN_Name;APP=Microsoft® Access;
Server=ServerName;DATABASE=DatabaseName;USERNAME=u sername;
PASSWORD=Password;Trusted_Connection=Yes;TABLE=Tab leName
Feb 28 '07 #4

P: 7
The properties of the Linked tables look like this
[ODBC;DSN=ODBC_PnP_RampUp_Manager;Description=PnP_R ampUpManager_DB _Connection;APP=Microsoft Office 2003;WSID=PC;DATABASE=*******;TABLE=******]
Its not a trusted connection it uses SQL authentication not just a network login
Feb 28 '07 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
The properties of the Linked tables look like this
[ODBC;DSN=ODBC_PnP_RampUp_Manager;Description=PnP_R ampUpManager_DB _Connection;APP=Microsoft Office 2003;WSID=PC;DATABASE=*******;TABLE=******]
Its not a trusted connection it uses SQL authentication not just a network login
Try recreating the DSN. This time there should be an option to hard code the Username and Password.

Mary
Feb 28 '07 #6

NeoPa
Expert Mod 15k+
P: 31,276
If this doesn't help, then we'd be happy to move this to the SQL Server forum for you, where the experts there should no more about it.
Although this presents when using Access, it's not really an Access issue as such.
Mar 2 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.