Deklarasi variable
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Configure a connection
Set cnn = New ADODB.Connection
cnn.CursorLocation = adUseClient
Tampilkan data dari ADODB recordset ke datagrid
Set DataGrid1.DataSource = rst
Atur tampilan datagrid (caption & width)
With DataGrid1
.Caption = "Tabel Kategori"
.Columns(0).Caption = "Kode Kategori"
.Columns(1).Caption = "Nama Kategori"
.Columns(0).Width = 2000
.Columns(1).Width = 3000
End With
Mendapatkan Data Dari Cell DataGrid Yang Aktif / Di Klik
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
Msgbox DataGrid1.Columns(DataGrid1.Col).Text
End Sub
Bibliography:
Related Post:
Database Connection String ( references )
ListView Properties ( references )
Microsoft Visual Basic 6 Data Binding Object
Fungsi File Dalam Visual Basic 6
Replace Double Quotes In A String VB6
Visual Basic (VB6) CRUD with Ms Access Database Code
Visual Basic Variable Keywords 1
Error Handling In Visual Basic
Most Common Chr Code In Visual Basic ( reference )
Default Value Of Data Types In Visual Basic 6 ( reference )
Visual Basic Intrinsic Controls
Tidak ada komentar:
Posting Komentar