C#SQLite的连接字符串格式字符串、格式、SQLite

由网友(等我前途伟大炸了清华北大)分享简介:我有一个2部分的问题在这里1)我下载的SQLite从这里: SQLite的网站和.NET 4.5有一个混合模式版本和非混合模式的版本。我怎么知道我应该使用哪一个?在做我用下面的命令连接:sqlite_conn =新SQLiteConnection(数据源= db.db;版本= 3;新= TRUE;的COM preSS...

我有一个2部分的问题在这里

1)我下载的SQLite从这里: SQLite的网站和.NET 4.5有一个混合模式版本和非混合模式的版本。我怎么知道我应该使用哪一个?

在做我用下面的命令连接:

  

sqlite_conn =新SQLiteConnection(数据源= db.db;版本= 3;新= TRUE;的COM preSS = TRUE;);

2)的版本= 3我想重新presents的SQLite正在使用的版本。所以,如果我从上面的版本的链接下载说System.Data.SQLite 1.0.84.0(3.7.15.2)包,以便我应该改变版本= 3到版本= 3.7.15.2 ??

解决方案 您应该选择混合之一。

在1.0.84.0是最新版本出了 SQLite的DLL 。我创建 一个与的SQLite 过在 C#应用程序,我连接的字符串的长相 如下所示:

  sqlite_conn =新SQLiteConnection(数据源= C: SQLITEDATABASES  SQLITEDB1.sqlite;版本= 3;);
 

wpf字符串格式化来实现空格占位 对齐问题Arial字符宽度不一致ChitGPT真牛

您正在使用的版本是的SQLite 第3版,该DLL仅仅是一个不同的版本,但与工作的SQLite 版本3。

I have a 2 part question here

1) I downloaded SQLite from here: SQLite Website and for .NET 4.5 there was a "mixed" mode version and the "non-mixed mode" version. How do I know which one I should use?

When making a connection I use the following command:

sqlite_conn = new SQLiteConnection("Data Source=db.db;Version=3;New=True;Compress=True;");

2) The "Version=3" I assume represents the version of SQLite being used. So if I download from the link above the version says System.Data.SQLite 1.0.84.0 (3.7.15.2) package so should I be changing the Version=3 to Version=3.7.15.2 ??

解决方案

You should pick the Mixed one.

the 1.0.84.0 is the newest version out for the SQLite DLL. I created an application with SQLite too in c#, my connection string looks like the following:

sqlite_conn = new SQLiteConnection("Data Source=C:SQLITEDATABASESSQLITEDB1.sqlite;Version=3;");

The version you are using, is SQLite version 3, the DLL is just a different version, but works with SQLite version 3.

阅读全文

相关推荐

最新文章