none
How to connect MySQL database in Windows Mobile using Visual Basic? RRS feed

  • Question

  • How to connect MySQL database in Windows Mobile using Visual Basic?
    Is it possible to connect MySQL database in Windows mobile?

    Becuase I got this error:
    Type 'MySQLConnection' is not defined.
    Type 'MySQLCommand' is not defined.
    Type 'MySQLDataAdapter' is not defined.

    Imports MySql.Data.MySqlClient
    Imports System.Data
    Imports Microsoft.Data.Odbc

     Dim conn As MySQLConnection = Nothing
            conn = New MySQLConnection(New MySQLConnectionString("locahost", "database", "root", "password").AsString)
            conn.Open()
            Dim commn As New MySQLCommand("set names gb2312", conn)
            commn.ExecuteNonQuery()
            Dim sql As String = "select * from exchange "
            Dim mda As New MySQLDataAdapter(sql, conn)
            Dim ds As New DataSet()
            mda.Fill(ds, "table1")
            Me.DataGrid1.DataSource = ds.Tables("table1")
            conn.Close()

    Pleae help to fix this problem!
    Sunday, February 15, 2009 6:06 AM

Answers

All replies