Development and application of embedded database SQLCE
In the current embedded industrial control products, the database has been used more and more. Through the database, it is very convenient to store and retrieve data, which greatly improves work efficiency. Intron’s ARM9 industrial motherboard, based on WinCE, provides two types of databases for customers to choose from for their applications. One is the database that comes with WinCE, which is mainly suitable for applications where the amount of data to be stored is small and the data structure is relatively simple, such as the dynamic configuration file of the system. The other is the most popular SQL database in the PC, the default configuration of the SQL database version of the Intron ARM9 industrial motherboard is SQL CE2.0. In Table 1, the comparison of some functions between WinCE’s own database and SQL CE database is listed. Users can choose the appropriate database according to their needs. For the operation of WinCE’s own database, please refer to the “EVC Advanced Programming and its Application Development” WinCE basic database programming section. This paper mainly explains how to develop SQLCE local database in eVC development environment, using ADOCE 3.1 as an example.
In the EVC environment, the Active Data Object for Windows CE(ADOCE) component is required to perform operations on the SQLCE database because no special API function is provided for SQLCE operations. In order to facilitate the use of SQLCE database, the use of ADOCE component technology (ADOCE introduction in Appendix 1), for the common functions of database operation, including creating open database, creating data tables, etc., Yingtron provides a management class DBManager for SQLCE database operation. By calling the API function provided in this class, the application can easily establish a link with SQLCE, open the database, and can directly use SQL statements to create tables on the database, add records to the table and query records in the table