Never imagined that the SQLite module had a problem in multithreading and could only be used by the thread that created the SQLite connection. Other Threads could not be used at all! Otherwise, an error is reported, which is disgusting. Now it seems
first, it refers to a conventional Code on the network, but many problems are encountered in actual use, paste the Regular usage as follows:
# Include # include # include int main (INT argc, char * argv []) {qcoreapplication A (argc, argv);
ArticleDirectory
Problem
Solution
Detailed description
Code
Problem
When the air application is executedProgramIn this case, we connect to the database file and create the same table. Solution
To solve this problem,
1. MOBILE/data/ApplicationsProgramCreate a database under the package name/directory
If the size of the created database is small, you can use the sqliteopenhelper class that comes with Android to directly generate the database on the mobile phone
SQLite is a lightweight database. Today, we have basically mastered how to use C # To operate SQLite databases. Based on the experiences of netizens, there are at least two methods to call SQLite, one is to call sqlite3.dll and the other is to use
as an open-source database, SQLite has been widely used on iOS, Android, and other platforms. It is much more efficient than Microsoft's sqlce in terms of operating efficiency, you can compare the performance on the Internet. reference blog: http:/
Copy the XX. DB file to the res \ raw directory of the eclipse Android project, as shown in 1. All files in the res \ raw directory are not compressed, so that files in the directory can be extracted directly.
Use the opendatabase method to open
PHP version 5.0 or later, open from PhP. ini:
Php_sqlite.dll
Php_pdo.dll
Php_pdo_sqlite.dll
Restart.
Check whether it is successful:
$ Db = sqlite_open ("DB. SQLite"); // open the DB. SQLite database, slite2 type. If it does
1. First export data from the MySQL database to a CSV file:
mysql> select * from city limit 20 into outfile "d:\city3.csv" FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
The preceding statement separates the fields of each data entry with
SQLite database storage method for Android Development
Introduction:SQLite is a very popular embedded database that supports SQL queries and uses only a small amount of memory. Android integrates SQLite at runtime, so every android application can
1. Create a data table:
The syntax rules and usage of this command are basically the same as those of most relational databases. Therefore, we use examples to demonstrate the rules for creating tables in SQLite. However, we will provide additional
Reprinting is also helpful. After reading this article, I understand, update
In addition to the execsql () and rawquery () methods described earlier, sqlitedatabase also provides operations corresponding to adding, deleting, updating, and
1.1Application Example
In this section, I will show some simple applications to illustrate the many features of SQLite. These applications will be shown in the following sub-sections
1.1.1 An SQLite application example
Let's start our exploration of
I have mentioned the problem of persistent access to sharedpreference and file operations data in Android Application Development. Today I will introduce the detailed operations of SQLite applications in Android:
In Android Application Development,
SQLite Introduction
Lite refers to Lite version. As the name suggests, SQLite is a very, very small database, which can almost ignore the occupied space, but it provides a complete relational database function.
Use of SQLite
To access the SQLite
/*************************************** *************
Everyone knows that it will be very tiring to write a blog.
Hope = reprint please indicate the source: http://blog.csdn.net/ta893115871
Please do not pity your mouse, (* ^__ ^ *) Xi ......
******
Recently, we are engaged in local SQLite queries. We need to query data within a certain period of time. In SQL, we all know that:
select * from tblName where rDate Between '2008-6-10' and '2008-6-12'
There is no problem in this way, but in SQLite
StatementYou are welcome to repost this article, but please respect the author's Labor achievements. repost this article and keep the statement in this box. Thank you.Article Source: http://blog.csdn.net/iukey
If you want to manipulate a
StatementYou are welcome to repost this article, but please respect the author's Labor achievements. repost this article and keep the statement in this box. Thank you.Article Source: http://blog.csdn.net/iukey
SQLite is a good thing for mobile
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