none
Does Visual Basic 2008 Support MySql Connection? RRS feed

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.
    Thursday, March 20, 2008 11:39 AM

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

    Wednesday, March 19, 2008 6:44 PM
  • 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.
    Thursday, March 20, 2008 11:39 AM
  • 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.

     

    Thursday, May 8, 2008 5:45 AM
  • 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
    Thursday, May 14, 2009 1:41 AM
  • 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
    Tuesday, August 11, 2009 11:56 AM
  • but if i want connect a DB of mysql using a dataset typed?
    how do you do?
    Thursday, November 5, 2009 4:22 AM
  • See if the following helps:

    http://forums.mysql.com/read.php?38,63017,63123


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, November 5, 2009 3:23 PM
  • Try this using your own mysql database


    Imports

     

    MySql.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
    Thursday, November 12, 2009 5:06 AM
  • So Are You Using Exactly VB 2008 Express Edition...

     

     If Its Working Can You Help Me out In Connecting it ...... In My Project..!!

     

    Thursday, August 12, 2010 10:08 AM