我在登录页面后运行我的应用程序时收到此错误,当我选择出现错误的任何选项时,有四个选项可供选择。enter image description here
您使用的连接字符串是什么?
有效连接字符串的示例:
_cnn = new SqlConnection(
new SqlConnectionStringBuilder()
{
DataSource = @"YourServerAdress",
InitialCatalog = "YourDB",
UserID = "username",
Password = "password"
}.ConnectionString
);
编辑,对于sqlliteconnection,连接字符串为:
_cnn = new SQLiteConnection("Data Source =" + PathOfYourdbFile + "; Version=3;");
_cnn.Open();