Use ODBC to operate DBF Files

Source: Internet
Author: User

. 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.