当前位置: 首页 > news >正文

SQLite 连接串说明

SQLite 连接串说明

Basic

Data Source=c:\mydb.db;Version=3;

Version 2 is not supported by this class library.

SQLite

In-Memory Database

An SQLite database is normally stored on disk but the database can also be stored in memory. Read more about SQLite in-memory databases here.

Data Source=:memory:;Version=3;New=True;
SQLite

Using UTF16

Data Source=c:\mydb.db;Version=3;UseUTF16Encoding=True;
SQLite

With password

Data Source=c:\mydb.db;Version=3;Password=myPassword;
SQLite
 

Using the pre 3.3x database format

Data Source=c:\mydb.db;Version=3;Legacy Format=True;
SQLite

With connection pooling

Connection pooling is not enabled by default. Use the following parameters to control the connection pooling mechanism.

Data Source=c:\mydb.db;Version=3;Pooling=True;Max Pool Size=100;
SQLite

Read only connection

Data Source=c:\mydb.db;Version=3;Read Only=True;
SQLite

Using DateTime.Ticks as datetime format

Data Source=c:\mydb.db;Version=3;DateTimeFormat=Ticks;

The default value is ISO8601 which activates the use of the ISO8601 datetime format

SQLite

Store GUID as text

Normally, GUIDs are stored in a binary format. Use this connection string to store GUIDs as text.

Data Source=c:\mydb.db;Version=3;BinaryGUID=False;

Note that storing GUIDs as text uses more space in the database.

SQLite

Specify cache size

Data Source=c:\mydb.db;Version=3;Cache Size=2000;

The Cache Size value measured in bytes

SQLite

Specify page size

Data Source=c:\mydb.db;Version=3;Page Size=1024;

The Page Size value measured in bytes

SQLite

Disable enlistment in distributed transactions

Data Source=c:\mydb.db;Version=3;Enlist=N;
SQLite

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=c:\mydb.db;Version=3;FailIfMissing=True;
SQLite

Limit the size of database

Data Source=c:\mydb.db;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.

SQLite

Disable the Journal File

This one disables the rollback journal entirely.

Data Source=c:\mydb.db;Version=3;Journal Mode=Off;
SQLite

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=c:\mydb.db;Version=3;Journal Mode=Persist;
SQLite

Controling file flushing

Data Source=c:\mydb.db;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.

 
http://icebutterfly214.com/news/29292/

相关文章:

  • 2025 11 10
  • 2025年军训服定制厂家权威推荐榜单:幼儿园服/迷彩服/校服源头厂家精选
  • 神级项目,Github 上线封神,BettaFish你不可忽视的多Agent舆情分析神器~~~
  • MyEMS:赋能能源精细化管理的智慧引擎
  • 2025年11月学习机品牌推荐:销量排行榜聚焦双师1对1与同步课标
  • 2025年11月智能学习机品牌推荐:新课标适配榜与护眼实力评测
  • Kerberos常见工具错误解析与修复指南
  • 配对序列P11187: 线性dp
  • UDP通信:解决socket连接关闭后缓冲内容未清除的问题
  • 2025年热门的石墨铜套用户好评厂家排行
  • 【触想智能】工业平板电脑一体机在自助查询终端服务领域上的七大应用优势
  • 2025年热门的全品类定制零角度铰链TOP实力厂家推荐榜
  • 2025年质量好的冷库制冷压缩机厂家最新热销排行
  • 2025年质量好的FFU龙骨最新TOP厂家排名
  • 2025年耐酸碱西安12m镀锌钢管热门厂家推荐榜单
  • 2025年口碑好的加厚吨袋厂家最新权威推荐排行榜
  • 2025年11月北京GEO优化公司推荐:知名机构排行榜与口碑评价对比
  • 2025年11月豆包关键词排名优化推荐:权威评测市场报告与选择排行榜
  • Luogu P1121 环状最大两段子段和 题解 [ 绿 ] [ 分类讨论 ] [ 线性 DP ]
  • 2025年石棉橡胶板厂家联系电话推荐:源头工厂直联通道
  • P14467 [COCI 2025/2026 #1] 扔球 / Krugomet 题解
  • AIGC|数字人平台技术创新与选择指南 - 二当家
  • ONNX模型文件
  • 2025年靠谱的重型纸箱最新TOP厂家排名
  • MyBatis的配置文件中定义类型别名(type aliases)的技巧
  • vbs脚本,批量将word文件转为pdf文件
  • 基于88 DCT变换的图像压缩MATLAB实现
  • 2025年11月北京律师推荐榜:权威评测十家律所与律师服务排行
  • 解锁高效协作:好用的跨网文件安全交换系统来袭!
  • 2025年惠州小规模纳税人代理记账公司权威推荐榜单:财税分析/营业执照代办/财税风险规避源头公司精选