开发者

How to connect vb.net on my mysql database with windows 7

I have some problems with a vb.net application. My application was perfectly working on XP, but now on my windows 7, each time I want to connect to localhost, I have a 开发者_开发问答driver problem (in french, that's why I don't put it here)...

Do you know were does it come from? My odbc driver is up to date...


Download and install Connector/.NET.

In your project, you should be able to add a reference to MySql.Data. You can then create your connection string.

Dim oMySqlConn As MySqlConnection = New MySqlConnection()
oMySqlConn.ConnectionString = "Data Source=localhost;"  & _
                              "Database=mySQLDatabase;"  & _
                              "User ID=myUsername;"  & _
                              "Password=myPassword;"  & _
                              "Command Logging=false"
oMySqlConn.Open() 

localhost can be replaced with either an IP address or 'servename.com'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜