C#SQLite的连接字符串格式 [英] C# SQlite Connection String Format

查看:475
本文介绍了C#SQLite的连接字符串格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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. 您应该选择混合之一。
  2. 在1.0.84.0是最新版本出了 SQLite的DLL 。我创建 一个与的SQLite 过在 C#应用程序,我连接的字符串的长相 如下所示:

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

您正在使用的版本是的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 ??

解决方案

  1. You should pick the Mixed one.
  2. 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:\SQLITEDATABASES\SQLITEDB1.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.

这篇关于C#SQLite的连接字符串格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆