Lazarus Real-combat development of the database SQLite (win32/wince)

Source: Internet
Author: User
Tags sqlite sqlite database win32

SQLite is a lightweight embedded database that doesn't work on PCs, but on wince, he's a big part of it (access stops upgrading on wince, and SQL CE is too big).

* Use SQLite on Lazarus for WIN32

1. Install SQLite for win32:vc2005 compile SQLite, place the compiled Sqlite3.dll under the Windows System folder, or directly to download the existing Sqlite3.dll.

2. Install the Lazarus SQLite control: \LAZARUS\COMPONENTS\SQLITE\SQLITE3LAZ.LPK

In WIN32 write good SQLite database program, and then modify the compiler, so as to generate the database program under the WinCE platform, which can greatly reduce the cross-compilation ~ Debugging Waste of Time!

* Use SQLite on Lazarus for wince

1. Compile to get SQLite3.dll for wince

2. Advanced Lazarus Application Engineering, add Sqlite3dataset control

3. You must first set the compiler properties of the project, click the menu item: Project > Compiler Options ..., click Path paging, and adapt the LCL widget to wince; Click Code Paging and Target Platform changed to Arm-wince.

4. Compile-time will be proposed Fatal:can ' t find the propedits used by registersqlite3 error, then need to modify \lazarus\components\sqlite\ Registersqlite3.pas's Code

5. Comment out the propedits,componenteditors,sqlitecomponenteditor; Registercomponenteditor (Tsqlite3dataset,tsqliteeditor)  ; Registerpropertyeditor (TypeInfo (String), Tsqlite3dataset, ' FileName ', tfilenamepropertyeditor); Comment out

6. Re-compile to pass.

Attached: When using a small number of data sensitive control such as DBGrid, even if compiled, but run on the wince or will put forward "Access violation" such errors, dbedit and other data-sensitive controls can be used normally!

Related Article

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.