无法找到 PInvoke DLL“System.Data.SQLite.DLL”中的入口点“sqlite3_open_interop”。
string CurrentPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
string SQLDB = CurrentPath + "\\POKE_YOKE.db";
//添加数据库数据源
if (!System.IO.File.Exists(SQLDB))
{
MessageBox.Show(CurrentPath);
MessageBox.Show("无法找到相应的数据库");
}
SQLDB = "Data Source=" + SQLDB + ""; //给sqlite的连接字符串赋值
using (SQLiteConnection conn = new SQLiteConnection(SQLDB))
{
//conn.ConnectionString = "Data Source= POKE_YOKE.db ;Pooling=true;FailIfMissing=false";
conn.Open();
SQLiteDataAdapter dap = new SQLiteDataAdapter("select * from UserInfo", conn);
DataTable Result = new DataTable();
dap.Fill(Result);
conn.Close();
MessageBox.Show(Result.Rows[0]["User_Name"].ToString());
}
到 conn.Open();这一步时报错
WinCE SQLite