bhermer
asked on
MySQL connection failing in Vista & VS2005
Hi,
I have been using VS2005 under XP pro fine.
I have just upgraded to Vista (downgraded maybe ;)) and I have opened one of my 'Working' websites that uses MySQL, using reference to the MySQL 1.08 ASP Connector.
I get the following error (btw I can connect to the DB fine through my DBtools DB manager software and the command promt so I know the DB is fine)
Unable to connect to any of the specified MySQL hosts
An example of the code is the following:
Imports MySql.Data.MySqlClient
Public Shared Function CreateDataSet(ByVal SQL As String)
Dim myConnection As New MySqlConnection("server=lo calhost; user id=root; password=******; database=aa; pooling=false;")
myConnection.Open()
Dim myCommand As New MySqlCommand(SQL, myConnection)
Dim myAdapter As New MySqlDataAdapter(myCommand )
Dim ds As New DataSet()
myAdapter.Fill(ds)
Return ds
End Function
Thanks
I have been using VS2005 under XP pro fine.
I have just upgraded to Vista (downgraded maybe ;)) and I have opened one of my 'Working' websites that uses MySQL, using reference to the MySQL 1.08 ASP Connector.
I get the following error (btw I can connect to the DB fine through my DBtools DB manager software and the command promt so I know the DB is fine)
Unable to connect to any of the specified MySQL hosts
An example of the code is the following:
Imports MySql.Data.MySqlClient
Public Shared Function CreateDataSet(ByVal SQL As String)
Dim myConnection As New MySqlConnection("server=lo
myConnection.Open()
Dim myCommand As New MySqlCommand(SQL, myConnection)
Dim myAdapter As New MySqlDataAdapter(myCommand
Dim ds As New DataSet()
myAdapter.Fill(ds)
Return ds
End Function
Thanks
Are you able to connect to MYSQL using any MYSQL client?
ASKER
I can connect to the DB fine through my DBtools DB manager software and the command promt so I know the DB is fine
ASKER
I can also connect using VB6 and ODBC fine, this must be a connector problem, I am just not sure what to do about it as it did work fine under XP
ASKER
ok, sorry to be a pain here, but I have found the solution, I have upgraded the connector to the latest version from here
http://dev.mysql.com/downloads/connector/net/5.1.html
cirtainly something I should have tried first. Sorry to have wasted your time.
http://dev.mysql.com/downloads/connector/net/5.1.html
cirtainly something I should have tried first. Sorry to have wasted your time.
Try ing to understand -> VB6 and Tools from the same Vista Machine is able to talk to the Database however when you are trying to connect to MYSQL through your .net code, it fails?
ASKER
yes, but VB6 uses an ODBC connector, and NET uses a .NET connector, different bits of software. I found an article on MySQL's site that was unrelated to this problem, but was about problems with Vista in general, it suggested trying this new connector, this has fixed the problem.
oh cool. Best of Luck with Vista. Its funny because we pay for Vista to get into more trouble :P
I think the ODBC Connector should also be Vista-compliant right? Is it available yet?
ASKER
hi, my comment:
ok, sorry to be a pain here, but I have found the solution, I have upgraded the connector to the latest version from here
http://dev.mysql.com/downloads/connector/net/5.1.html
cirtainly something I should have tried first. Sorry to have wasted your time.
was the solution, any chance you can mark that as the answer for anyone else needing the info?
ok, sorry to be a pain here, but I have found the solution, I have upgraded the connector to the latest version from here
http://dev.mysql.com/downloads/connector/net/5.1.html
cirtainly something I should have tried first. Sorry to have wasted your time.
was the solution, any chance you can mark that as the answer for anyone else needing the info?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.