Koneksi modul database MYSQL using code vb.net

Free Tutorial by hunianrakyat.com
KONEKSI  MODUL
+++++++++++++++++++++++++++++

Imports System.Data.Odbc
Imports System.Data
Module Module1
    Public conn As OdbcConnection
    Public da As OdbcDataAdapter
    Public ds As DataSet
    Public strcon As String

    Public Sub SAMBUNG()
        strcon = "Driver={MySQL ODBC 3.51 Driver};database=bbm;server=localhost;uid=root"
        conn = New OdbcConnection(strcon)
        If conn.State = ConnectionState.Closed Then
            conn.Open()
        End If
    End Sub
End Module

PANGGIL MODUL KONEKSI
++++++++++++++++++++++++++++++

Imports System.Data.Odbc
Imports System.Data

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SAMBUNG()
        da = New Odbc.OdbcDataAdapter("select * from cetak_nota", conn)
        ds = New DataSet
        ds.Clear()
        da.Fill(ds, "cetak_nota")
        DataGridView1.DataSource = (ds.Tables("cetak_nota"))

    End Sub
End Class
 Tutorial Selanjunya Free Tuorial lainnya

JASA PEMBUATAN TOKO ONLINE MURAH


A. CONTOH TOKO ONLINE DESAIN DINAMIS SEDERHANA  RP. 250.000 PLUS DOMAIN DAN HOSTING GRATISAN  PLUS PANDUAN UPLOAD DI WEBHOSTING HOSTING BERIKUT CONTOH TAMPILAN DEPAN :





Pembuatan Toko Online dilengkapi dengan Database

Source Code PHP MYSQL Toko Online :
Tersedia Database input Kategory, Kategory produk, Daftar produk, Member, Panel Admin dll Siap Upload To Hosting anda.
Rp. 300.000,-
Lihat DEMO