Re: Where is Connector/NET Documentation
Posted by: Michelle Tay
Date: December 25, 2004 02:05AM

I am a beginner to the MySQL..I would like to use Connector/Net to link MySQL with VB.Net.
I am using the local host. I don't know why I cant connect to the Database. the error msg state that "Access denied for user 'username'@'localhost'(using password:YES)"

Here is my code:

Private Sub connectMysql
Dim myConnection As New MySqlConnection
myConnection.ConnectionString = "server=localhost; database=databaseName; uid=username;password=password"

Dim myInsertQuery As String = "INSERT INTO tblStaff (s_id, s_pwd, s_fname, s_lname, s_group) Values(hdyy, 452287, Panda, Cute, Normal)"
Dim myCommand As New MySqlCommand(myInsertQuery)
myCommand.Connection = myConnection


MsgBox("Connection ok")

End Sub

Please help me.. Thank 1st :)


Options: ReplyQuote

Written By
Re: Where is Connector/NET Documentation
December 25, 2004 02:05AM

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.