Windows 8 Development-Summary of using SQLite Database

Source: Internet
Author: User

Currently, Win8 does not have a local database. Using SQLite for Win8 data access is a more practical solution.

I encountered some problems when using SQLite. Now let's make a summary as the Development notes.


(1) For the installation tutorial of SQLite on vs2012, refer to: SQLite for win8.

SQLite does not support any CPU compilation in the Win8 environment for the time being, that is, the processors in the arm and x64 architectures must be compiled once.


(2) The system version and development environment of SQLite should use the RTM version, that is, Win8 RTM + vs2012 RTM. If vs2012 RC or vs2012 RP is used, a problem occurs when vs creates a database and a prompt is displayed:Windows cannot be installedProgramPackage Microsoft. vclibs.110.debug, because this package requires the architecture
Arm, but this computer has an architecture x64.

There is a reference link for the solution to this problem, but it does not work for vs2012 RC. You can solve the problem by uninstalling and reinstalling the RTM version (reference of the msdn Forum ).


(3) when creating a database, consider the path to the database. There is a default line in SQLite. CS.Code:

 
VaR r = sqlite3.open (databasepath, out handle );

If the user name of the local machine is named in Chinese, this line of code should be changed to (to read Chinese characters correctly ):

 
VaR r = sqlite3.open16 (databasepath, out handle );

Otherwise Vs will prompt:Attackers try to load programs with incorrect format.


(4) Since SQLite does not support any CPU compilation, we temporarily abandoned using SQLite for database implementation and switched to XML + JSON. With less data query optimization, Data efficiency should be reduced. However, it is sufficient for databases with non-large data volumes.


(5) Let's continue to wait for the improvement and development of the SQLite library itself. We have the opportunity to use it again, alas.




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.