C# 访问加密sqllite
作者:互联网
1.我使用的版本System.Data.SQLite 版本 1.0.58.0 x64 .net framework 3.5
2.引用System.Data.SQLite
3.代码测试
using System; using System.Collections.Generic; using System.Data; using System.Data.SQLite; using System.Linq; using System.Text;
namespace ConsoleApp2 { class Program { static void Main(string[] args) { string connectionString = "Data Source=G:/xxxx.db;Initial Catalog=sqlite;Integrated Security=True;Max Pool Size=10;Password=xxxx"; SQLiteConnection sqlLiteConnection = new SQLiteConnection(connectionString); if (sqlLiteConnection.State != System.Data.ConnectionState.Open) { sqlLiteConnection.Open(); string sql = "SELECT * FROM sqlite_master WHERE type='table' "; var cmd = new SQLiteCommand(sql, sqlLiteConnection); cmd.CommandText = sql; StringBuilder tableNames = new StringBuilder(); using (SQLiteDataAdapter ap = new SQLiteDataAdapter(sql, sqlLiteConnection)) { DataSet ds = new DataSet(); ap.Fill(ds); DataTable dt = ds.Tables[0]; } } sqlLiteConnection.Close(); } } }
4.System.Data.SQLite版本
下载地址 https://master.dl.sourceforge.net/project/sqlite-dotnet2/OldFiles/SQLite-1.0.58.0-binaries.zip?viasf=1
标签:sqlLiteConnection,SQLite,加密,C#,System,new,using,Data,sqllite 来源: https://www.cnblogs.com/lx727408661/p/15566367.html