Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
88d6dc06
Commit
88d6dc06
authored
Feb 10, 2025
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 SQLite 连接字符串添加 BusyTimeout=100, 用于解决当前写入数据库时,执行读取,会弹出BUSY(5)。 起码会各等100ms。调用时,还需要使用try catch
parent
2c9d6c0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
SQLiteDbContext.cs
Project.SQLiteHelper/SQLiteHelper/SQLiteDbContext.cs
+2
-1
No files found.
Project.SQLiteHelper/SQLiteHelper/SQLiteDbContext.cs
View file @
88d6dc06
...
...
@@ -19,7 +19,8 @@ namespace SQLite
{
get
{
return
string
.
Format
(
"Data Source={0};Version=3;"
,
DBPath
);
//超时100ms
return
string
.
Format
(
"Data Source={0};Version=3;BusyTimeout=100"
,
DBPath
);
}
}
public
string
DBPath
{
get
;
private
set
;
}
=
@"test.sqlite3"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment