C # how to operate SQLite Databases,
Some people may have used SQLite in java Development before, but they are somewhat impressed with it. When developing small applications using Winform or Wpf, we found that using SQLite database is also good. Just like a member management software, after development, you can save the complicated SQL server operations. During software installation, no additional database environment is required, which is simple and convenient. Are you interested in SQLite? The following describes how to operate the SQLite database in C.
SQLite Introduction
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
SQLite is an open-source and free small EmbeddableRDBMS (Relational Database Service). It is implemented in C and has a small memory usage. It supports a large number of SQL92 standards and has become increasingly popular, it is small and widely used in various types of applications. SQLite is already the world's most widely deployed SQL database engine, used in countless desktop computer applications, as well as consumer electronics, such as mobile phones, handheld computers and MP3 players.
List of SQLite keywords, supported SQL syntax
A brief introduction is as follows:
System. data. SQLite is an enhanced version of the original SQLite. it will be a complete replacement of the original sqlite3.dll (you can even rename it as sqlite3.dll ). it does not need to be linked.. NET independent release, but it is embedded with a complete ADO. the NET2.0 engine provides complete support for development.
Features:
Complete ADO. NET2.0 implementation
The entire project is based entirely on VS2005 and ADO. NET2.0 is completely new and uses all ADO. new Features of NETframework. including full support for DbProviderFactory, Automatic Distributed Transaction calling, and extensive mode support. In addition, all classes are from ADO. the base class of NET2.0 is inherited.
Supports complete and streamlined. NETFramework and C/C ++
① This library does not need to be linked to the. NET runtime. It is 100% compatible with the original sqlite3.dll and can be developed using unmanaged C/C ++.
Portable database files
① Unencrypted SQLite database files can be used freely across platforms and processors, including non-Windows platforms. Encrypted databases can be used on all Windows platforms.
② Reliable speed, faster than most other embedded databases, including SqlServerMobile
③ SQLite installation occupies less space than SqlMobile. It consumes less memory during running and generates a smaller database.
Database Encryption
① The entire database file can be encrypted. Binary and plaintext passwords are supported.
Support for Visual Studio Design
① You can add an SQLite connection to ServerExplorer, use the query designer to create a query statement, and drag a table to a dataset! SQLite developers can work in a variety of Visual Studio versions including the trial version.
The size of a single file re-deployment package is less than KB
① Package SQLite and ADO. NET together. Pre-compiled binary files provide x86, IA64, x64, and ARM versions.
Extensive SQL language support
SQLite supports most SQL92 standards (seebelow). Supports named and unnamed parameters to pass in the SQLite kernel through an optimized pipeline in UTF-8 and UTF-16 encoding.
User-Defined Functions and sorting
① Fully supports user-defined functions and sorting methods, which means you can use your favorite. NET language to implement features not provided by SQLite, which will be very simple.
All source code. 100% is provided for free.
① The source code of all the encapsulated libraries is public. No protocol constraints are imposed on individual or commercial applications.
Download can be used without installation, graphical interface, easy to operate.
C # procedure for using SQLite:
(1) create a project
(2) Add SQLite operation driver dll reference
(3) Use APIs to operate SQLiteDataBase
Encapsulate some common functions into the SQLiteHelper class