Adding tables and setting properties

M

Mark

Can someone point me to an example of how I can link a
table via code that is in a password protected database
and also one for how I would manipulate the tables hidden
property.

Thanks in advance.

Mark
 
A

Alex Dybenko

Mark,
assuming you have a code to relink tables - you have to add password to
connect property string, as below:

MyTable.Connect = ";DATABASE=C:\my.mdb;PWD=MyPassword"
 
T

Tcs

You didn't specify what your database is. If you're using DB2, adding the
password won't help, as best I can recall. (If YOU get it to work, please let
me know. :) )

I'm not positive anymore, but I THINK even if I I hardcoded the password in the
string, or retrieved it and added it to the string, Access still prompted me for
the username & password. (I don't like to hardcode the password anyway.) The
only progress I could make was that I could prefill the username field. Perhaps
it's because a user's username and password on the 400 could be different than
that on the PC and/or in the domain. But Access prompts just one time so it can
recreate (refresh) my links to DB2. then it doesn't bother me anymore with any
prompts.

HTH
 

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