Code:
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Form_Load()
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Database Folder\Student Database.mdb;Persist Security Info=False"
rs.CursorLocation = adUseClient
rs.Open "Select * from Student_Info", con, adOpenKeyset, adLockPessimistic, adcmdtxt
Set DataGrid1.DataSource = rs
DataGrid1.Refresh
Set rs = Nothing
End Sub
If you like my work ,Please hit LIKE button and Subscribe to my channel
0 comments:
Post a Comment