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.