Support library education bureau
Support library specification
. Subroutine _ button 1_ was clicked.
. Local variable a, integer type
Set random number seed ()
A = random number (1, record set, number of records)
Debugging output (a)
Edit box 1. Content = name text [a]
. Subroutine _ _ Start Window _ Created
. Local variables connect text, text type.
. Local variable file address, text type.
Local variable SQL statement, text type
. Number of cycles of integer local variables
File address = running directory ()+"\ name. xls "
. If (database connection. connection(" driver = { Microsoft Excel driver(*。 xls))}; DriverId = 790dbq = "+ file address+"; Default dir = "+ file address+";" ) = true)
Output debugging text ("Link successful!" )
If true (recordset. Set connection (database connection) = false)
Return()
If it's over.
SQL statement = "select * from [sheet 1 $] "
Record set. Open (SQL statement, #SQL statement)
Number of cycles = Recordset. Record quantity
Redefine array (text variable, false, recordset, number of records)
. Calculate the first cycle (number of cycles,)
Record set. Read text (0, text variable [1])
Add member (name text, text variable [1])
Record set. Go to the next page ()
. Count cycle tail ()
Output debugging text ("Reading and display succeeded!" )
Otherwise.
Output debug text (database connection. The last error)
If it's over