Agan-agan buatlah sebuah Module pada aplikasi agan, dan tuliskan kodingnya seperti diatas untuk Koneksi databasenya :
Imports System.Data
Imports System.Data.Sql
Module MODUL_KONEKSI
Public DATABASE As New OleDb.OleDbConnection
Public TAMPIL As New OleDb.OleDbCommand
Public TAMPILKAN As OleDb.OleDbDataReader
Public GRID As New OleDb.OleDbDataAdapter
Public DS As New DataSet
Public TABEL As String
Public RECORD As New BindingSource
Public DMLSQL As New OleDb.OleDbCommand
Public Sub KONEKSI()
Try
DATABASE.Close()
DATABASE.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;Initial Catalog=ABSENSI;Data Source=."
DATABASE.Open()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
End Module
Asslkm Wr Wb.........
ReplyDeleteMaaf pak saya mau tanya,
saya mau tau cara koneksi VB.Net dengan Mysql bagaimana .... ?
Teri maskih sebelumnya...