Does Visual Basic 2008 Support MySql Connection?
http://dev.mysql.com/downloads/connector/net/5.2.html
Yes It does; look at this connector to make your life Easier
FPena
Accounting Online Software
Answers
- Yes, but you can't use the designers because they don't support the MySQL providers or drivers. You would have to write ADO.NET code instead.
All Replies
The question is, if visual basic 2008 express edition support mysql.
so far i know, there is a plug in for vs 2008 but not for 2008 express edition
- Yes, but you can't use the designers because they don't support the MySQL providers or drivers. You would have to write ADO.NET code instead.
I've tested it with VB 2008 Express Edition.
Install this connector http://dev.mysql.com/downloads/connector/net/5.2.html
on your project add a reference to MySQL.Data
Connection String:
"Data Source=myServer;Database=myDB;User ID=myUser;Password=myPass"
MySQL Connection:
MySql.Data.MySqlClient.MySqlConnection
MySQL Command:
MySql.Data.MySqlClient.MySqlCommand
it worked on me.
- There are three downloads on this page.
Which one?
And I'm writting a visual basic application using a remote MySQL dB.
I'm learning little pieces here and there.
Is there someplace to understand the big picture for nubies and where to go from there?
Thanks,
Mike Yes, but you can't use the designers because they don't support the MySQL providers or drivers. You would have to write ADO.NET code instead.
Help me undertsand your answer in relation to primjohnz's response. He is able to use the mysql reference in his code, then connect using connector/net. Are you saying something different with your mention of havingt o write ado.net code? I apologize for not understanding all the vernacular yet :)I'm currently using vb.net and mysql and wondering if I'll have to learn ado.net code(?) if I switch over to visual basic 2008 express?Thank you,Jim- but if i want connect a DB of mysql using a dataset typed?
how do you do? - See if the following helps:
http://forums.mysql.com/read.php?38,63017,63123
Paul ~~~~ Microsoft MVP (Visual Basic) Try this using your own mysql database
ImportsMySql.Data.MySqlClient
Public
Class A_Test_Form_MySql
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn = New MySqlConnection()
conn.ConnectionString =
"server=" & txtServer.Text & ";" _
&
"user id=" & txtUsername.Text & ";" _
&
"password=" & txtPassWord.Text & ";" _
&
"database=northwind"
Try
conn.Open()
MessageBox.Show(
"Connection Opened Successfully")
conn.Close()
Catch myerror As MySqlException
MessageBox.Show(
"Error Connecting to Database: " & myerror.Message)
Finally
conn.Dispose()
End Try
End Sub
End
Class
F. Pena
www.AOScorporation.com
FPENA


