Results 1 to 3 of 3

Thread: HEEELLLLPPPP!!

  1. #1

    Thread Starter
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621

    Angry

    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


  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    The first argument to the Append method should be a new user object and not a string.

  3. #3

    Thread Starter
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    Joacim

    What do you mean
    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
  •  



Click Here to Expand Forum to Full Width