溫馨提示×

加密的sqlite數(shù)據(jù)庫怎么打開

九三
1547
2021-02-23 14:25:51
欄目: 云計算

加密的sqlite數(shù)據(jù)庫怎么打開

打開加密sqlite數(shù)據(jù)庫的方法有以下兩種

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();

0