[AccessD] Password Problem

Gary Kjos garykjos at gmail.com
Tue Jan 18 10:40:50 CST 2011


Found some references that say the new password isn't actually saved
until you do a RefreshLink Method
---------------------------------------------------------------
http://www.accessmonster.com/Uwe/Forum.aspx/access/121423/change-connection-string-to-linked-table-with-VBA
----------------------------------------------------------------

Refreshlink method (From Access 97 Help file)

Syntax

tabledef.RefreshLink

The tabledef placeholder specifies the TableDef object representing
the linked table whose connection information you want to update.

Remarks

To change the connection information for a linked table, reset the
Connect property of the corresponding TableDef object and then use the
RefreshLink method to update the information. Using RefreshLink method
doesn't change the linked table's properties and Relation objects.

For this connection information to exist in all collections associated
with the TableDef object that represents the linked table, you must
use the Refresh method on each collection.

------------------------------------------------

On Tue, Jan 18, 2011 at 10:20 AM, Rocky Smolin <rockysmolin at bchacc.com> wrote:
> Using a constant would work even though this is an mdb, except that  the
> user wants to change the password from time to time and I don't want him to
> have to come back for a code change every time.
>
> However, that only applies to opening the mdb with dbengine or currentdb -
> manipulating recordsets.  My problem is that I can't even open a query that
> uses a linked table.  That password is somehow, I think, in the link.
>
> Rocky
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> Sent: Tuesday, January 18, 2011 8:17 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Password Problem
>
> Yeah, I ran into this with password protected BE's too.  It was simpler to
> use a constant for the password, but that pretty much eliminates the
> security unless you are distributing a runtime.  What about storing the
> password in a library with restricted access?
>
> Charlotte Foust
>
> On Tue, Jan 18, 2011 at 7:57 AM, Rocky Smolin <rockysmolin at bchacc.com>
> wrote:
>> Gary:
>>
>> Where I use DBEngine I had the pwd parameter without MS ACCESS; but it
>> seemed to work OK.
>>
>> The problem I'm having is just opening a bound form or even running a
> query.
>> There's something about the table link that's retaining the old password.
>> And I stepped through the relinking code which I can trigger a la
>> carte (just to see if relinking the tables through the code would
>> work) and the connect string for the linked tables was null so it didn't
> refresh the link.
>>
>> Now, if I point to a different database, in this case the same file
>> name in a different folder, it works.  But changing the password on
>> the same database does not apparently update the password in the link.
>>
>> TIA
>>
>> Rocky
>>
>>
>> -----Original Message-----
>> From: accessd-bounces at databaseadvisors.com
>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos
>> Sent: Tuesday, January 18, 2011 7:40 AM
>> To: Access Developers discussion and problem solving
>> Subject: Re: [AccessD] Password Problem
>>
>> Found this several places regarding relinking code to password
>> protected backends ....
>>
>> --------------------------------------
>> Figured it out.  If you are connecting to a password protected BE, you
>> HAVE to provide the OPTIONAL parameters as follows:
>>
>> DBEngine(0).OpenDatabase(strDBPath, False, False, "MS
>> Access;PWD=xxx10")
>>
>> If you do not it just raises the password error.
>> --------------------------------------
>>
>> On Tue, Jan 18, 2011 at 9:29 AM, Rocky Smolin <rockysmolin at bchacc.com>
>> wrote:
>>> Dear List:
>>>
>>> This is a legacy app that the client asked me to put a password on
>>> the back end.  He also wants to be able to change the back end
>>> password from time to time.  So I gave him instructions on how to do
> that.
>>>
>>> However, after the password is changed the bound forms error out with
>>> an invalid password.  If I go to the database container and try to
>>> open a linked table in datasheet view I get 'Not a Valid Password'.
>>>
>>> If I delete the table links and relink the table, all is OK.  But I
>>> cannot refresh the links with the Linked Table Manager in
>>> Tools-->Database Utilities.
>>>
>>> There is relinking code but relinking to the existing back end
>>> doesn't clear up the problem.  In fact, the relinking code does not
>>> prompt for the database password.
>>>
>>> The table links apparently have the old password in there somehow.
>>> So I'm missing a step here.  Obviously I don't want the user to have
>>> to delete the table links and relink.
>>>
>>> What am I missing?
>>>
>>> MTIA
>>>
>>>
>>> Rocky Smolin
>>>
>>> Beach Access Software
>>>
>>> 858-259-4334
>>>
>>> Skype: rocky.smolin
>>>
>>> www.e-z-mrp.com <http://www.e-z-mrp.com/>
>>>
>>> www.bchacc.com <http://www.bchacc.com/>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> http://databaseadvisors.com/mailman/listinfo/accessd
>>> Website: http://www.databaseadvisors.com
>>>
>>
>>
>>
>> --
>> Gary Kjos
>> garykjos at gmail.com
>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Gary Kjos
garykjos at gmail.com




More information about the AccessD mailing list