[Easy language] Connect to Access database learning

Source: Internet
Author: User

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

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.