加密的sqlite数据库怎么打开

968
2021/2/23 14:25:51
栏目: 云计算
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

加密的sqlite数据库怎么打开

打开加密sqlite数据库的方法有以下两种

1.SQLiteConnection方法

SQLiteConnection cnn = new SQLiteConnection(“Data Source=c:\\test2.db“);

cnn.SetPassword(“password“);

cnn.Open();

2.SQLiteConnectionStringBuilder方法

SQLiteConnectionStringBuilder builder = new SQLiteConnectionStringBuilder();

builder.DataSource = @”c:\test.db“;

builder.Password = @”password“;

SQLiteConnection cnn = new SQLiteConnection(builder.ConnectionString);

cnn .Open();

辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读: 数据加密主要要素是哪些