Declare
Status
,
DB_ID
,
LT
; Create Lookup Table object
LT_Create
LT
,
0
,
1
; Connect to Database
DB_Create
DB_ID
,
`Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\ETS\SamplesEx\ADO_DB\Biblio.mdb`
; Delete record with ID=5
DB_Execute
Status
,
DB_ID
,
"DELETE FROM Authors WHERE Au_ID=5; "
; Insert new record
DB_Execute
Status
,
DB_ID
,
"INSERT INTO Authors (Author,Au_ID, [Year Born]) VALUES ('Coronys',5,2001); "
; Run SQL transaction and put results to the Lookup Table
DB_Query
Status
,
DB_ID
,
`Select * From Authors where Authors.Au_ID < 20;`
,
LT
; Close connection to the Database
DB_Delete
DB_ID
; Show Lookup Table Datasheet
LT_UpdateTable
Status
,
LT
,
"Top 20 Records"
; Close Lookup Table object
LT_Delete
LT
End