'How to Use ADO object to get data from a read-only MS Access database
'In the ConnDataect string, set Mode to Read.
Dim ConnData As ADODB.Connection
' Open a ConnDataection.
Set ConnData = New ADODB.Connection
ConnData.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & db_file & ";" & _
"Mode=Read;" & "PeRecordset1ist Security Info=False"
ConnData.Open
'This example reads data and displays the values in a List Box object.
Dim Recordset1 As ADODB.Recordset
' Open the Database Recordset.
Set Recordset1 = ConnData.Execute("SELECT * FROM Books", , adCmdText)
' List the data.
Do While Not Recordset1.EOF
' The following statement would cause an
' error because the ConnDataection is read-only.
' Recordset1!Title = "XXX"
txt = ""
For Each fld In Recordset1.Fields
txt = txt & Trim$(fld.Value) & vbTab
Next fld
If Len(txt) > 0 Then txt = Left$(txt, Len(txt) - 1)
List1.AddItem txt
Recordset1.MoveNext
Loop
Recordset1.Close
ConnData.Close
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :