Jun 1st, 2000, 11:15 AM
I know I've asked this question before but I am still having a problem. How can I set the path of mdw file, user name, and password in run time on VB6. For example.
dim AppAccess as new Access.Application
** AppAccess.DBEngine.SystemDB="your.mdw"
AppAccess.DBEngine.DefaultUser="UserID"
AppAccess.DBEngine.DefaultPassword="PasswordforaboveUser"
AppAccess.OpenCurrentDatabase("your mdb")
AppAccess.Visible = True
The above code works perfectly if the workgroup jointed to the System.mdw. But it doesn't work if the workgroup jointed to another mdw file. Whenever the VB6 hits the ** line. It pops up a dialog box asks for the UserID and the password. How can I bypass this dialog box by writing VB code?? Thanks in advance. :)
dim AppAccess as new Access.Application
** AppAccess.DBEngine.SystemDB="your.mdw"
AppAccess.DBEngine.DefaultUser="UserID"
AppAccess.DBEngine.DefaultPassword="PasswordforaboveUser"
AppAccess.OpenCurrentDatabase("your mdb")
AppAccess.Visible = True
The above code works perfectly if the workgroup jointed to the System.mdw. But it doesn't work if the workgroup jointed to another mdw file. Whenever the VB6 hits the ** line. It pops up a dialog box asks for the UserID and the password. How can I bypass this dialog box by writing VB code?? Thanks in advance. :)