如何设置数据库的密码? [英] How to set password to database?
本文介绍了如何设置数据库的密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何设置数据库密码。所以没有人可以使用我的file.db.
how can I set a password to my database. So nobody can use my file.db.
直到现在我才尝试这个......
Till now I was trying this ...
string conString = @"Data Source=file.db;Version=3;";
SQLiteConnection conn = new SQLiteConnection(conString);
conn.SetPassword("password");
conn.Open();
但它显示错误消息...
but it show me an error message ...
File openedthat is not a database file
file is encrypted or is not a database
有什么问题?谢谢。
What is the problem? Thank you.
推荐答案
你的connectionstring错过了一个文件夹分配
Your connectionstring misses a folder assignment
这篇关于如何设置数据库的密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文