-
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.
-
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.
-
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.