SQLite数据库连接方式
SQLite数据库连接方式
SQLite.NET
Type: .NET Framework Class Library
Usage: System.Data.SQLite.SQLiteConnection
Basic
Data Source=filename;Version=3;
Version 2 is not supported by this class library.
Using UTF16
Data Source=filename;Version=3;UseUTF16Encoding=True;
With password
Data Source=filename;Version=3;Password=myPassword;
Using the pre 3.3x database format
Data Source=filename;Version=3;Legacy Format=True;
With connection pooling
Connection pooling is not enabled by default. Use the following parameters to control the connection pooling mechanism.
Data Source=filename;Version=3;Pooling=False;Max Pool Size=100;
Read only connection
Data Source=filename;Version=3;Read Only=True;
Using DateTime.Ticks as datetime format
Data Source=filename;Version=3;DateTimeFormat=Ticks;
The default value is ISO8601 which activates the use of the ISO8601 datetime format
Store GUID as text
Normally, GUIDs are stored in a binary format. Use this connection string to store GUIDs as text.
Data Source=filename;Version=3;BinaryGUID=False;
Note that storing GUIDs as text uses more space in the database.
Specify cache size
Data Source=filename;Version=3;Cache Size=2000;
The Cache Size value measured in bytes
Specify page size
Data Source=filename;Version=3;Page Size=1024;
The Page Size value measured in bytes
Disable enlistment in distributed transactions
Data Source=filename;Version=3;Enlist=N;
Disable enlistment in distributed transactions
Data Source=filename;Version=3;Enlist=N;
Disable create database behaviour
If
the database file doesn't exist, the default behaviour is to create a
new file. Use the following parameter to raise an error instead of
creating a new database file.
Data Source=filename;Version=3;FailIfMissing=True;
Limit the size of database
Data Source=filename;Version=3;Max Page Count=5000
相关文档:
安装:
官方网站下载最新的sqlite版本
官方网站: http://www.sqlite.org/
下载地址为: http://www.sqlite.org/download.html
官方的下载页面提供了很多版本的下载…这里介绍一下;
Source Code: 源代码版本的下载
Documentation: 相关文档
Precompiled Binaries for Linux / Precompiled Binaries For Mac ......
内存数据库FastDB和SQLite性能测评
作者:tamsyn
来源:www.sqlite.com.cn
时间:2009-10-21
一、引言
在很多项目中,经常会碰到这样的需求,需要对大量数据进行快速存储、查询、删除等操作,特别是在一些针对诸如运营商、银行等大型企业的应用中,这些 ......
我现在要使用SQLite3.0创建一个数据库,然后在数据库中创建一个表格。
首先要引入SQLite3.0的lib库。然后包含头文件#import <sqlite3.h>
【1】打开数据库,如果没有,那么创建一个
sqlite3* database_;
-(BOOL) open{
NSArray *paths = NSSearchPathForDirectoriesInDomai ......
AutoIt3开发的操作SQlite数据库的源码下载
部分源码
_SQLite_Startup () ;加载 SQLite.dll
If Not FileExists($SQLite_Data_Path) Then
SQLCreate()
EndIf
$GUI_Form = GUICreate($Title, 300, 435, -1, -1)
GUISetBkColor(0xECE9D8) ; will change background color
$GUI_ListBox = GUIC ......