|
-
Aug 1st, 2000, 06:56 AM
#1
Thread Starter
Fanatic Member
There must be someone who knows this.
I have a database with an MDW file.
I am trying to write code to add a new user to this database.
The code to add a new user is as follows.
Code:
'\\Set catalog active connection to the DB connection
cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=M:\NewMIS.mdb;" & _
"Jet OLEDB:System database=M:\System.mdw;" & _
"User ID=WIPWOSAdmin;Password=goldfish;"
'\\Append the user to the database
cat.Users.Append txtUserName, txtPassword
This is how it is explained on the Microsoft site.
Every time it reaches the cat.Users.append part, a run time error '3001' is caused Description: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Can anbody explain why this is happening.
I don't really want to have to revert back to DAO to solve this.
Gary Lowe 
VB6 (Enterprise) SP5
ADO 2.6
SQL Server 7 SP3
OK I know my spelling and grammer is crap so don't quote me on it!
To err is human to take the P! is only natural !!
Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip

-
Aug 1st, 2000, 08:48 AM
#2
The first argument to the Append method should be a new user object and not a string.
-
Aug 1st, 2000, 08:56 AM
#3
Thread Starter
Fanatic Member
Gary Lowe 
VB6 (Enterprise) SP5
ADO 2.6
SQL Server 7 SP3
OK I know my spelling and grammer is crap so don't quote me on it!
To err is human to take the P! is only natural !!
Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|