vb: how to open, read, write, update, search database?
This site provides users with the information about "vb, visual basic, vb6, database, how to open database, how to read db, how to write database, how to update db, search db, and more.
If you think that this site is helpful, please recommend your friends to visit our site.
How to open, read, write, update, search database?
The following is the code for opening, reading, writing, updating, searching database:
Public dbCurrent As Database
Public recCategories As Recordset
Private Sub Command1_Click()
Set dbCurrent = OpenDatabase(App.Path & "\test.mdb")
Set recCategories = dbCurrent.OpenRecordset("info")
Set rstInfo = dbCurrent.OpenRecordset("info")
Do While Not .EOF
If .EOF Then
If .RecordCount = 0 Then
MsgBox "No matching records found."
If (!province = "On") Then
!province = "BC"
Set dbCurrent = Nothing