Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Data.OleDb
- Imports System.Data
- Imports Access = Microsoft.Office.Interop.Access
- Imports Microsoft.Office
- Public Class Form6
- Dim oledbKoneksi As OleDbConnection = New OleDbConnection
- Dim oledbPerintah As OleDbCommand = New OleDbCommand
- Dim lokasiFile As String = "D:\fileAccess\"
- Dim namaFile As String = "Database1.accdb"
- Dim stringKoneksi As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & lokasiFile & namaFile & ";" & "Persist Security Info=False"
- Dim adapter As New OleDbDataAdapter
- Private Sub Form6_Load(sender As Object, e As System.EventArgs) Handles Me.Load
- ListBox1.Items.Add("Kacang")
- ListBox1.Items.Add("Beras")
- ListBox1.Sorted = True
- ListBox1.SelectionMode = SelectionMode.MultiExtended
- 'ListBox1.SetSelected(0, True)
- 'ListBox1.SetSelected(1, True)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement