SQLite 连接串说明

news/2025/11/10 15:04:09/文章来源:https://www.cnblogs.com/wkk2020/p/19207072

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://www.mzph.cn/news/961424.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SRS(simple-rtmp-server) 一快速环境搭建

SRS(simple-rtmp-server) 一快速环境搭建 介绍了如何使用Docker快速部署SRS流媒体服务器,拉取镜像、启动服务、通过FFmpeg推流及访问控制台的过程。1.拉取docker镜像:docker pull ossrs/srs:dev2.启动镜像docker run…

SQL中GROUP BY WITH ROLLUP和GROUPING 函数的使用

WITH ROLLUP:是 SQL 的分组汇总扩展,用于在分组的基础上生成各级别的汇总行,能方便地得到每个分组以及所有分组的总计数据。 GROUPING 函数:用于标识某一行是否是由 ROLLUP 生成的汇总行,返回 0 表示是原始数据行…

⚡️ 高性能绿色Markdown文档阅读器:Litho Book技能架构深度解析

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

完整教程:深度学习实战:从图像分类到自然语言处理的完整指南

完整教程:深度学习实战:从图像分类到自然语言处理的完整指南pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Con…

【完整源码+内容集+部署教程】 黄瓜叶片检测系统源码和数据集:改进yolo11-RVB

【完整源码+内容集+部署教程】 黄瓜叶片检测系统源码和数据集:改进yolo11-RVB2025-11-10 14:58 tlnshuju 阅读(0) 评论(0) 收藏 举报pre { white-space: pre !important; word-wrap: normal !important; overflow…

EasyGBS/EasyNVR高并发适配!PostgreSQL部署指南

EasyGBS/EasyNVR高并发适配!PostgreSQL部署指南在某些部署场景中,例如当客户新部署的EasyGBS或EasyNVR系统需要接入大量设备,或面临高并发访问压力时,我们默认采用的SQLite数据库可能因性能限制而不再适用。为确保…

国产化Word处理控件Spire.Doc教程:使用Java将RTF文件转换为PDF的全面教程

RTF 格式广泛用于文本格式化、字体样式和图片插入,而 PDF(Portable Document Format)则是跨平台文档存储和传输的标准格式,具有高度的兼容性和安全性。本教程将深入介绍如何使用 Spire.Doc for Java 库在 Java 中将…

详细介绍:K8S(七)—— Kubernetes Pod 进阶配置与生命周期管理全解析

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

2025年门卫室岗亭源头厂家综合实力榜单:形象岗亭/小区值班岗亭/钢结构吸烟亭源头厂家精选

门卫室岗亭作为城市管理和企业安保的第一道防线,其市场需求与城市基础设施建设同步增长。数据显示,2024年全国安防行业总产值中,实体防护设施占比约25%,其中标准化与定制化岗亭需求显著提升。本文基于对企业生产能…

2025 11 10

第20场 (为了完整把前天的一部分粘贴过来了T1 秒了 T2 我不行了,啥性质都分析出来了,就是没有想到把第 \(i\) 个物品合并放到第 \(i+1\) 里去,那我能说啥呢见过的套路不够多加上当时的脑袋比较混沌,加上自己比较蠢…

2025 ICPC 南京站 游记

Day -inf zxx 卷文化课不想打。于是组新队,报名南京站。 Day -2 上午在 UCUP 上打了今年的西安站。 写了 \(5\) 个题,最终过了 \(9\) 题,罚时有点多。 Day -1 睡觉 Day 0 上午没打 NFLSPC。 中午打车去了南航,进校…

fastgithub

国内访问GitHub卡顿/打不开?这6种方法亲测有效(附详细操作指南)_github打不开-CSDN博客

2025年工业制冷优质供应商Top 5榜单:专业评测与推荐

摘要 工业制冷行业在2025年持续快速发展,得益于冷链物流、制造业升级和节能环保需求的推动,市场规模预计年增长率超过8%。本文基于用户搜索意图,提供市面上口碑好的工业制冷供应商排名,涵盖维修制冷、螺杆机服务和…

树莓派性能分析脚本

脚本内容 以下是一个包含依赖项说明和安装步骤的脚本: #!/bin/bash# 创建日志文件 LOG_FILE="performance_test.log" echo "System Performance Test Log" > $LOG_FILE echo "----------…

windows客户端配置免密上传代码到gitlab

1.windows客户端为例,我在windows上面生成一个密钥C:\Users\Administrator>ssh-keygen -t rsa -C "1172593152@qq.com" Generating public/private rsa key pair. Enter file in which to save the key (…

2025年餐盒吸塑机批发厂家综合实力榜单:水果盒吸塑机/吸塑成型设备/酒托吸塑成型机源头厂家精选

餐盒吸塑机作为食品包装行业的核心装备,其市场需求与餐饮外卖行业的增长紧密相关。行业数据显示,2024年中国外卖市场规模已超过1万亿元,带动一次性餐盒年消耗量达数百亿只。本文基于对企业技术实力、设备性能、市场…

PDG常见问题

1、首先打开cddt文件,点击Protocol Services,找到对应的诊断服务,如19服务;2、然后右击选择Properties;3、最后点击右侧手指的图标,修改对应寻址方式下的肯定响应抑制位置1或者置0,保存即可。在CANdelaStudio中…

2025年工业制冷供应商综合实力排行榜:专业评测与选择指南

摘要 随着工业制冷行业的快速发展,市场对高效、可靠的制冷解决方案需求日益增长。本文基于行业数据和技术参数,对市面上主流工业制冷供应商进行综合评测,为企业在选择合作伙伴时提供权威参考。文章包含详细的技术分…

现今工业制冷实力厂家评测

摘要 工业制冷行业在2025年持续发展,随着节能减排政策的推进和市场需求增长,高效、可靠的制冷解决方案成为关键。本文基于权威数据和行业洞察,为您推荐排名前五的工业制冷实力厂家,并提供详细评测供参考。表单排名…

日志模块

目录日志模块1、关于记录用户操作日志的几个认知2、关于日志的几个认知3、设计4、例子后端维护日志同一性前端维护日志同一性 日志模块 1、关于记录用户操作日志的几个认知 (1)日志记录内容的设计,应方便后续查询、…