我的SQL连接问题连接已成功与服务器建立,但随后发生错误
问题描述:
我的项目是在Vb和Mysql中开发的。现在我收到错误连接已成功与服务器建立,但在登录过程中出现错误
我的Db连接代码是
My Project is developed in Vb and Mysql. Now i got an error"Connection was Successfully established with the server,but then error occured during the login process"
My Db Connection Code is
Public Sub OpenDatabase(ByVal pblnOpen As Boolean)
If GCon.State = ConnectionState.Open Then GCon.Close()
GCon.ConnectionString = String.Format("Server={0};user id={1};password={2};database={3};Pooling=false", GstrServerName, GstrDBUser, GstrDBPass, GstrDBName)
If pblnOpen Then GCon.Open()
End Sub
我尝试过:
我尝试了很多其他但是没有清除错误
What I have tried:
I tried many other but the error was not cleared
答
使用调试器检查你传递的名称和密码,然后尝试UID和连接字符串中的PWD而不是用户ID和密码。
Check the name and password you are passing using the debugger, and try "UID" and "PWD" instead of "user id" and "password" in your connection string.