. Version 2
. Supports database spec
.ProgramSet window assembly 1
. Assembly variable set handle, integer type
. Assembly variable set DBF file name, text type
. Subroutine _ button 1 _ clicked
Set DBF file name = "2 years"
Debug output (External Database 1. Open ("driver = {Microsoft DBASE Driver (*. DBF)}; DBQ =" + retrieve the current directory () + ";",)
Debug output (External Database 1. Fetch connection text ())
Set handle = External Database 1. Query ("select distinct class from" + set DBF file name)
Debug output (set handle)
External Database 1. To the first record (set handle)
. Judge the first loop (External Database 1. After the last record (set handle) = false)
Debug output (to text (External Database 1. Read (set handle, 1 )))
External Database 1. The last record (set handle)
. Judge the end of the loop ()
External Database 1. Disable record set (set handle)