SQLite数据库连接方式
http://blog.csdn.net/ZF101201/archive/2010/05/26/5626365.aspx
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;
The Max Page Count is measured in pages. This parameter limits the maximum number of pages of the database.
Disable the Journal File
This one disables the rollback journal entirely.
Data Source=filename;Version=3;Journal Mode=Off;
Persist the Journal File
This one blanks and leaves the journal file on disk after a commit. Default behaviour is to delete the Journal File after each commit.
Data Source=filename;Version=3;Journal Mode=Persist;
Controling file flushing
Data Source=filename;Version=3;Synchronous=Full;
Full specifies a full flush to take action after each write. Normal is the default value. Off means that the underlying OS flushes I/O's.
2.Finisar.SQLite ADO.NET Data Provider
Standard
Data Source=mydb.db;Version=3;
The "Version" key can take value "2" for SQLite 2.x (default) or value "3" for SQLite 3.x
Create a new database
Data Source=mydb.db;Version=3;New=True;
Using compression
Data Source=mydb.db;Version=3;Compress=True;
Specifying Cache Size
The Cache Size value represents the amount of data pages that are held in memory. Try increase this value for speed improvements but don't forget to keep track of the applications memory usage.
Data Source=mydb.db;Version=3;Cache Size=3000;
3.SQLite3 ODBC Driver
Standard
DRIVER=SQLite3 ODBC Driver;Database=mydb.db;LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;
.NET Framework Data Provider for ODBC
Bridging to SQLite3 ODBC Driver
This is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class.
DRIVER=SQLite3 ODBC Driver;Database=mydb.db;LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;
SQLite数据库连接方式的更多相关文章
- SQL server 数据库连接方式分析
SQL server 数据库连接方式图示: ODBC和OLEDB连接的区别 ODBC(开放数据库互连):是Microsoft引进的一种早期数据库接口技术.它实际上是ADO的前身.早期的数据库连接是非常 ...
- 浅析B/S架构数据库连接方式
前言 在许许多多的B/S架构系统中都涉及到了数据库的链接,那么对于数据库连接的方式有哪些?可能出现的问题是什么? 目录 1.普通连接方式 2.单例模式 3.连接池 分析 普通连接: 下面是我们 ...
- SQLite加密方式 [转]
关于SQLite SQLite是一个轻量的.跨平台的.开源的数据库引擎,它的在读写效率.消耗总量.延迟时间和整体简单性上具有的优越性,使其成为移动平台数据库的最佳解决方案(如iOS.Android). ...
- WebForm(二)——控件和数据库连接方式
一.简单控件 1.Label(作用:显示文字) Web中: <asp:Label ID="Label1" runat="server" Text=&quo ...
- mysql数据库连接方式(.net)
1.通过ado.net连接(数据库连接串中库名称为中文无法使用) 需要添加MySql.Data.dll(可通过安装mysql-connector-net-6.8.3.mis获得) 引用MySql.Da ...
- 二、spring Boot构建的Web应用中,基于MySQL数据库的几种数据库连接方式进行介绍
包括JDBC.JPA.MyBatis.多数据源和事务. 一.JDBC 连接数据库 1.属性配置文件(application.properties) spring.datasource.url=jdbc ...
- beego中各类数据库连接方式
beego 框架是优秀得go REST API开发框架.下面针对beego中各类数据库连接操作做一个总结. 1. orm连接方式 beego中的orm操作支持三种数据库:mysql,sqlite3,p ...
- sql server 数据库连接方式分析、详解
本文链接:https://blog.csdn.net/wang379275614/article/details/7859398 一.OLEDB方式连接Sql身份验证模式:Provider=" ...
- Access数据库连接方式
网络连接:Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\server\share\folder\myAccessFile.accdb;标准安全:Pro ...
随机推荐
- POJ 3090 (欧拉函数) Visible Lattice Points
题意: UVa 10820 这两个题是同一道题目,只是公式有点区别. 给出范围为(0, 0)到(n, n)的整点,你站在原点处,问有多少个整点可见. 对于点(x, y), 若g = gcd(x, y) ...
- POJ 3253 Fence Repair【二叉堆】
题意:给出n根木板,需要把它们连接起来,每一次连接的花费是他们的长度之和,问最少需要多少钱. 和上一题果子合并一样,只不过这一题用long long 学习的手写二叉堆的代码,再好好理解= = #inc ...
- web交互方式
轮询:客户端定时向服务器发送Ajax请求,服务器接到请求后马上返回响应信息并关闭连接. 优点:后端程序编写比较容易. 缺点:请求中有大半是无用,浪费带宽和服务器资源. 实例:适于小型应用. 长轮询:客 ...
- [LA 3887] Slim Span
3887 - Slim SpanTime limit: 3.000 seconds Given an undirected weighted graph G <tex2html_verbatim ...
- WAPI
中国制定的WLAN安全标准WAPI 针对WLAN安全问题,中国制定了自己的WLAN安全标准:WAPI. 与其他无线局域网安全机制(如802.11i)相比,WAPI主要的差别体现在以下几个方面: • 双 ...
- android左右滑动加载分页以及动态加载数据
android UI 往右滑动,滑动到最后一页就自动加载数据并显示 如图: package cn.anycall.ju; import java.util.ArrayList; import java ...
- Delphi richedit获取选中文字
function TForm1.GetSendText(RichEdit: TExRichEdit): string;var MsgListInfo: TStrings; i, m, n: i ...
- IOS 点击按钮 光环 冲击波效果
UIBezierPath * path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(0, 0) radius:ROUND_WIDTH/2 - ...
- 《Python 学习手册4th》 第十二章 if测试和语法规则
''' 时间: 9月5日 - 9月30日 要求: 1. 书本内容总结归纳,整理在博客园笔记上传 2. 完成所有课后习题 注:“#” 后加的是备注内容 (每天看42页内容,可以保证月底看完此书) “重点 ...
- STM32查看系统时钟
调用库函数RCC_GetClocksFreq,该函数可以返回片上的各种时钟的频率 函数原形 void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clock ...