温馨提示×

加密的sqlite数据库怎么打开

九三
1589
2021-02-23 14:25:51
栏目: 云计算
亿速云云数据库,读写分离,安全稳定,弹性扩容,低至0.3元/天!! 点击查看>>

加密的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();

亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>

推荐阅读:sqlite数据库用什么打开

0