Sub Globals
Dim db As db 'Dims a variable to use for the db class
db.Initialize(Me) 'Initializes the db object for use, pass Me so the class will know the calling Activity
'This creates a database or opens one if it exist
db.CreateDataBase(0, "misc-contacts.dat", File.DirInternal, Array As String("name", "zip", "phone"))
End Sub
Sub adddata
db.PutField("name", "Jimmy Joe Brown")
db.PutField("zip", "37373")
db.PutField("phone", "(473) 998-9900")
db.AddRecord 'Add a record with the above info
db.PutField("name", "Betty Sue Brown")
db.PutField("zip", "37373")
db.PutField("phone", "(473) 996-0099")
db.AddRecord 'Add another record with the above info
End Sub
Sub showdata
'Show the records in the database
db.ListRecords("Select Record to View/Modify", Array As String ("name", "zip", "phone"))
End Sub