Database SQLite (Win32/wince) developed by Lazarus)

Source: Internet
Author: User
This article from http://blog.csdn.net/hellogv/

SQLite is a lightweight embedded database that is not needed on a PC, but it plays a major role in WinCE (access stops upgrading on WinCE, SQL CE is too large ).

  • Use SQLite on Lazarus for Win32
  1. Install SQLite for Win32: vc2005 compile SQLite, http://blog.csdn.net/hellogv/archive/2008/05/06/2399700.aspx, put the compiled sqlite3.dll under the Windows system folder; you can also directly go to www.sqlite.org to download the existing sqlite3.dll.
  2. Install the SQLite control of Lazarus:/Lazarus/components/SQLite/sqlite3laz. LPK

Compile the SQLite database program in Win32 and modify the compiler to generate the database program on the wince platform. This can greatly reduce cross-compilation ~ Debugging is a waste of time!

  • Use SQLite on Lazarus for WinCE
  1. Compiled sqlite3.dll for WinCE
  2. Advanced Lazarus application project, add sqlite3dataset Control
  3. You must first set the compiler properties of the Project. Please click the menu item:Project> compiler options..., ClickPathPage, and adapt the LCL widget to wince. ClickCodePage, and change target platform to arm-wince.
  4. During compilation, an error such as fatal: Can't Find unit propedits used by registersqlite3 will be raised. You need to modify the code of/Lazarus/components/SQLite/registersqlite3.pas.
  5. Comment out propedits, componenteditors, and sqlitecomponenteditor; comment out registercomponenteditor (timer, tsqliteeditor); registerpropertyeditor (typeinfo (string), comment, 'filename', tfilenamepropertyeditor );
  6. Recompile to pass.

Appendix: when using a small part of data-sensitive controls such as DBGrid, even if the compilation passes, running on WinCE still raises the "access violation" error, 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.