Re: Assign username/password to access file
- From: "Paul Scott" <paul.scott@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 09 Oct 2007 15:27:16 +0100
On Tue, 09 Oct 2007 04:00:32 +0100, Brian Bushay TeamB <BBushay@xxxxxxxxx> wrote:
If I want to assign a username and a password to an existing accessfile, how
do I do this? Please code sample....
Neither of these can be set with ADO.
On Access 2002 with ADO, a simple "Execute_SQL"...
AdoConnection.Execute (
'alter database PASSWORD [' + NewDatabasePassword + ']'
+ ' [' + OldDatabasePassword + ']',
RecordsAffected, [eoExecuteNoRecords] )
.... works for me!
And unlike JRO's "CompactDatabase" this doesn't require the copy of a (possibly large) database. But, of course, you might find the compaction to be of benefit.
The square brackets round the [Passwords] are in case any of the passwords contain "strange" characters, such as embedded spaces, etc.
--
Paul Scott
Information Management Systems
Macclesfield, UK.
.
- References:
- Assign username/password to access file
- From: Mikael Lenfors
- Re: Assign username/password to access file
- From: Brian Bushay TeamB
- Assign username/password to access file
- Prev by Date: Re: Assign username/password to access file
- Next by Date: Delphi Web Services and Oracle Stored Procedure
- Previous by thread: Re: Assign username/password to access file
- Next by thread: TADOStoredProc
- Index(es):
Relevant Pages
|