First, support library configuration
Tools-Support Library configuration-database Operations Support Library
Second, add the control
Start window Add control (database connection/recordset/Super list box)
Third, database connection
Database connection 1. Connect to access ("Database file path", "Database Password")
Example: Database connection 1. Connect to access (take run directory () + "H:\m.mdb", "")
Iv. Defining variables
. local variable index, integer type
. local variable User ID, integer type
. Local variables date time, text type
V. Examples
. Support Library EDB. Version 2. Support Library Iext. assembly window Assembly 1. Subroutine __ Start Window _ created <pre name= "code" class= "plain"; local variable index, integer type. Local variable user ID, Integer. local variable Date Time, Text type
Database connection 1. Connect to access (Fetch run directory () + "H:\m.mdb", "") Super list box 1. Delete all () Recordset 1. Set Connection (database connection 1) Recordset 1. Open ("CheckInOut", #数据表名). First (Recordset 1. Number of records ,) Recordset 1. Read Integer ("UserID", User ID) Recordset 1. Read text ("Checktime", datetime) index = Super list box 1. Insert Table Entry (-1, to text (user ID),,,) Super list box 1. Place title (index, 1, date Time) Recordset 1. To the next (). Count Cycle Tail () Recordset 1. Close ()