0
我用這個代碼和SQLite說:「數據源不能爲空。用途:內存:打開一個內存數據庫」適配器不使用SQLite C#加載任何
這裏是我的代碼
string dbfile = new System.IO.FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).DirectoryName + "\\m23.db";
string sql;
DateTime dt = DateTime.Now;
SQLiteConnection connection = new SQLiteConnection("datasource="+ dbfile);
SQLiteDataAdapter adapter = new SQLiteDataAdapter("select * from p_posts", connection);
DataSet data = new DataSet();
adapter.Fill(data); // <<< here i get the error
SQLiteCommand cmd = new SQLiteCommand();
cmd.CommandType = CommandType.TableDirect;
cmd.Connection = connection;
connection.Open();
任何幫助, 乾杯!
它的工作原理! ,但現在它說我的桌子存在o.O – Aviatrix 2009-07-23 14:25:48