日期:2014-05-18  浏览次数:20956 次

SQLite报 no such table
//将信息插入数据库
  private void insertInfo(ArrayList insertList)
  {
  SQLiteConnection scn = new SQLiteConnection("Data Source = " + AppDomain.CurrentDomain.BaseDirectory + "card.db");
  SQLiteCommand cmd = new SQLiteCommand("insert into CARD_INFO (SFZH,XM,XB,MZ,CSRQ,ZZXZ) VALUES (" + insertList + " )", scn);
  scn.Open();
  cmd.ExecuteNonQuery();
  scn.Close();
  }
C#这方面不是很熟悉希望大家帮帮

------解决方案--------------------
没有CARD_INFO这个表
------解决方案--------------------
数据库里有这个表吗?CARD_INFO

no such table就是表名错误的提示
------解决方案--------------------
探讨
//将信息插入数据库
private void insertInfo(ArrayList insertList)
{
SQLiteConnection scn = new SQLiteConnection("Data Source = " + AppDomain.CurrentDomain.BaseDirectory + "card.d……

------解决方案--------------------
探讨

引用:
引用:
//将信息插入数据库
private void insertInfo(ArrayList insertList)
{
SQLiteConnection scn = new SQLiteConnection("Data Source = " + AppDomain.CurrentDomain.BaseDirectory + "card.d…………

------解决方案--------------------
路径有问题
SQLiteConnection scn = new SQLiteConnection("Data Source =E:\\c#_workspace\\mp\\mp\\db\\card.db");

------解决方案--------------------
SQLiteConnection scn = new SQLiteConnection("Data Source = " + AppDomain.CurrentDomain.BaseDirectory + "card.db");