Re: VB 2005 + MySQL Connector/.NET 5.0 = Errorcode -2147467259
Posted by: Tulga Lkhagvasuren
Date: December 24, 2006 10:12PM

Hi there... Maybe you must insert Port adddress...default address is 3306
Here is some example....

Private Function mysqlconnect(ByVal tablename As String) As DataTable
Dim connstr As String
connstr = String.Format("port=3306;server={0};user id={1}; password={2}; database=gdata; pooling=false", servername, username, password)
sqlconnection = New MySql.Data.MySqlClient.MySqlConnection(connstr)
sqlconnection.Open()
Mysqlda = New MySql.Data.MySqlClient.MySqlDataAdapter("SELECT * FROM " + tablename, sqlconnection)
Mysqlda.Fill(Mysqldata)
sqlconnection.Close()
Return Mysqldata
End Function

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.