Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.mdw ???

Status
Not open for further replies.

access97to2000

Programmer
Aug 12, 2002
45
US
Hi,
i want to add users to system.mdw file programatically from visual basic. how can i do that ?
any ideas?
i am trying to do this way.

dim mycat as new adox.catalog
strconnect - info about database.mdb and workgroup file
mycat.activeconn = stronnect
mycat.users.append username,password

its throwing an error at the last statement
any ideas please...
 
'- this works on my system using MDAC library 2.6 and with Access 2000.

Dim cg As New ADOX.Catalog
Set cg.ActiveConnection = CurrentProject.Connection
cg.Users.Append "sam", "abc"

Ideas.
Maybe need later version of mdac.
Maybe the connection string is not set up correctly.
Are username and password string variables.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top