Imports System.Data
Imports System.Data.Sql
Module koneksi
Public yongki 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
yongki.Close()
'server
'yongki.Connectionstring = "Provider=SQLOLEDE.1;Password=sasa;Persist Security
'info=True;User ID=sa;Initial Catalog=TI4AK;Data Source=192.168.10.44"
'lokal
yongki.ConnectionString = "Provider=SQLOLEDB.1;Integrated security=SSPI;persist security=Info=false;Initial Catalog=johan;data source=.;"
yongki.Open()
'Tampil.Connection = yongki
MsgBox("koneksiberhasil")
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
End Module
0 komentar:
Posting Komentar