Adding tables and setting properties

  • Thread starter Thread starter Mark
  • Start date Start date
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
 
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"
 
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
 
Back
Top