Finally in Qt the operation of SQLite successfully, write a summary of it. In fact, the right time, but to view the database is not desired results. The final discovery of the generated execution file in the Dbug directory, unlike the previously set
The source files of SQLite have been obtained from the http://www.sqlite.org/homepage, and there is no time to study the problem of compiling.The first is to encounter is, after compiling, only produces the Sqlite3.dll file, does not produce the
Download the jar package:Http://www.sqlite.com.cn/Upfiles/source/sqlitejdbc-v033-nested.tgz Public classTestsqlite { Public Static voidMain (string[] args) {Try { //connect to SQLite's JDBCClass.forName ("Org.sqlite.JDBC"); //Create a
MySQL takes up too much memory, so choose SQLiteInstallation://Updatesudoapt-Get updatesudoapt-Get Upgrade//Installing NginxsudoApt-getInstallNginx//start Nginxsudo/etc/init.d/Nginx Start//Installing PHP-FPMsudoApt-getInstallphp5-FPM//Installing
There are two ways to perform SQLite database transactions in C #: SQL code and C # code1.SQL Code:BEGIN ...COMMIT/rollback2.c# Code:using(Sqliteconnection conn =sqlitehelper.getsqliteconnection ()) {dbtransaction trans=Conn.
In the project development, using SQLite accidentally will encounter a variety of db anomalies, online search without this information, write down to record.Exception information:Android.database.sqlite.SQLiteMisuseException:library routine called
In Sqlite3, the structure of the top syntax is not used, and the Sqlite3 uses limit to achieve such a function.The data in the MyTable table is as follows:ID Value1 Hello2 You3 You4 Very Good5 !The following SQL statement: SELECT * FROM
Name holobby
Tom football
Peter basketball
What should we do if we want to find a row of data that interests football? I found a lot of methods on the Internet, but I couldn't find any idea. So I wasted a lot of time. Fortunately, I finally
Select
* Fromtablewhere number like '%/%' escape '/'...
When the sqlite3 database is searching, some special characters need to be escaped. The specific escape is as follows:
/-> //
'->''
[-> /[
]->/]
%->/%
&-> /&
_-> /_
(-> /(
)-> /)
Continue to learn! Find information before learning
SQLite SQL Attach Database
Begin transaction
Comment
Commit transaction
Copy
Create Index
Create Table
Create trigger
Create View
Delete
Detach Database
Drop Index
Drop table
Drop trigger
Drop
Today, a friend tested SQLite and concluded that the efficiency of SQLite was too low. It took 2 minutes to insert 1000 records in batches!
Below is the test he sent me
Code . My dizzy ~~~~~~
Using system. Data;Using system. Data. Common;Using
1. Ado. net provider for SQLite.
ADO. NET provides
Program It is provided by a company in Hong Kong. For the project address, see: http://sourceforge.net/projects/sqlite-dotnet2.
2. encapsulate SQLite. NET and provide a simple operation help class.
SQLite supports three thread modes:Single thread: In this mode, mutual exclusion is not performed, and multithreading is insecure. Disable all mutex locks. errors may occur during concurrent use. This parameter is enabled when SQLITE_THREADSAFE = 0
Android applications may inevitably deal with SQLite. With the continuous upgrading of applications, the original database structure may no longer adapt to new features. At this time, the structure of the SQLite database needs to be upgraded.
SQLite
During application initialization, a large amount of data needs to be inserted into sqlite in batches. The for + Insert method is used separately, resulting in slow application response. Because a statement is a transaction by default when sqlite
Person entity class
Copy codeThe Code is as follows: package com. ljq. domain;
Public class Person {Private Integer id;Private String name;Private String phone;
Public Person (){Super ();}
Public Person (String name, String phone ){Super ();This.
1. Take the following steps to use the SQLite database in Metro:
1) download SQLite for WinRT
Address: http://www.sqlite.org/download.html
Download Precompiled Binaries for Windows Runtime, which is an extension of Visual Studio. The file is
In VC ++, you can use the sqlite3.dll interface to operate the sqlite database, including opening the database, inserting and querying the database. If the input parameters of the operation interface contain Chinese characters, the operation will be
The following are frequently used Sqlite functions. The content format is relatively fixed. encapsulation helps improve development efficiency (^_^ at least improves Codeeer efficiency)
In addition, I found that Sqlite has fewer Chinese materials,
SQLite is organized by B-Tree in external databases. For details about B-tree, refer
**
** Donald E. Knuth, the art of computer programming, Volume 3:
** "Sorting And Searching", pages 473-480. Addison-Wesley
** Publishing Company, Reading,
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.