Results 1 to 3 of 3

Thread: Login HELP!

  1. #1

    Thread Starter
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Unhappy

    Hi Everybody!

    I hope you can help me. I have my application logging into my SQL server 7.0 for user security. I can log in to my login screen, but the application seems to not hold on to the username and password when I try to open other forms in the application. It gives me this error:

    Run-time error '-2147217843(80040e4d)':
    Login failed for user '(null)'

    Here is a sample of what I have on Form_load on the forms that give me the error:

    Code:
    Set cn = New Connection
        cn.Provider = "SQLOLEDB.1"
        cn.ConnectionString = "DATABASE=QCManager;SERVER=d248r00b;UID=" & A_Sign_On.txtuName.Text & ";PWD=" & A_Sign_On.txtPword.Text & ";"
        cn.Open
    A_Sign_On.txtuName.Text and A_Sign_On.txtPword.Text are the username and password respectively. A_Sign_On is the form where the user puts in the username and password.

    Any ideas on how to solve this problem?

    Thanks in advance.


    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    First thing I would do is check that the A_Sign_On form is still available (i.e. Not Nothing). Sounds like your out of scope...

    Cheers,

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  3. #3

    Thread Starter
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Talking Thanks

    Thanks, you are right. I got a solution to this problem from another forum friend, Lafor. For anyone else that is interested in this, here's the link to the thread:

    http://forums.vb-world.net/showthread?threadid=39841

    Ok, Bye.
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

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