
Using MS Data Control DAO to access a password protected database
Chris from Joplin,MO:
here is an easy way to do that
Data1.Connect = ";PWD=password"
Data1.DatabaseName = path
path is a variable to location of *.mdb
Quote:
> Hi Alan, This is Jean-Pierre From Paris
> Try
> DBEngine.SystemDB = "C:YourFile.MDB" ' Where "C:YourFile.MDB"
> is the path to your database
> ' file
> DBEngine.DefaultUser = "Admin" ' Where "Admin"
> is the user that can log to the database
> DBEngine.DefaultPassword = "PasswordText" ' where "PasswordText"
> is the
> ' password to access to the database
> Au revoir and let me know... :-)
> > Can anybody help?
> > I am trying to secure an mdb file so that the user has no access through
> MS
> > Access. My project uses ms data controls. I can connect using opendatabase
> > but cannot get the data controls to log on as they require a password.
> > ie. data1.databasename=
> > Is there any way to get it to see a password, or do I just have write the
> > data directly to the controls with my own recordset?