Imports System.Data.Sql
Module koneksidatabase
Public Database As New OleDb.OleDbConnection
Public Tampil As New OleDb.OleDbCommand
Public Tampil2 As New OleDb.OleDbCommand
Public Tampilkan As OleDb.OleDbDataReader
Public hasiljur, jur, hasilcek As String
Public Sub Koneksi()
Try
Database.Close()
'server'
'Database.ConnectionString = "Provider=SQLOLEDB.1;Password=123456;Persist Security Info=True;"User ID=sasa;Initial Catalog=PTJayaKarta;Data Source=192.168.10.4
'lokal
Database.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TI4P;Data Source=."
Database.Open()
'Tampil.Connection = Database
MsgBox(" Koneksi Berhasil ")
Catch ex As Exception
MsgBox(ex.ToString)
End Try