Results 1 to 2 of 2

Thread: VBSQL TYPE MISMATCH ERROR

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Location
    dubai
    Posts
    39

    Post

    Hello!,


    I am getting type mismatch error when I call vbsql functions.

    Private Sub Command1_Click()
    Dim result As Long
    'Get a Login record and set login attributes.
    Login = SqlLogin()
    LoginID = Text2.Text
    passwd = Text3.Text

    result = SqlSetLUser(Login, LoginID)
    result = SqlSetLPwd(Login, passwd)
    result = SqlSetLApp(Login, example)

    'Get a connection for communicating with SQL Server.
    Server = Text1.Text
    Sqlconn = SqlOpen(Login, Server)

    End Sub


    At the SqlSetLUser call the error is returned. The return is 'long' defined in the vbsql.bas


    Can anybody help?


    ------------------
    ganraj.

    [This message has been edited by ganraj (edited 12-08-1999).]

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,175

    Post

    You are getting the error not because of what it returns, but what you are sending it. As far as I can see, you haven't Dim'ed Login so it becomes a Variant, and I assume that SqlSetLUser is expecting a string.

    ------------------
    Marty

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