Imports System.Data
Imports System.Data.Sql
Module konek
Public johan As New OleDb.OleDbConnection
Public tampil As New OleDb.OleDbCommand
Public tampil2 As New OleDb.OleDbCommand
Public tampilkan As OleDb.OleDbDataReader
Public hasiljur, jur As String
Public Sub koneksi()
Try
johan.Close()
'server
'johan.Connectionstring = "Provider=SQLOLEDE.1;Password=sasa;Persist Security
'info=True;User ID=sa;Initial Catalog=TI4AK;Data Source=192.168.10.44"
'lokal
johan.ConnectionString = "Provider=SQLOLEDB.1;Integrated security=SSPI;persist security=Info=false;Initial Catalog=johan;data source=.;"
johan.Open()
'Tampil.Connection = johan
MsgBox("koneksiberhasil")
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
End Module
Tidak ada komentar:
Posting Komentar