首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

SQLite报 no such table,该如何解决

2012-05-24 
SQLite报 no such table//将信息插入数据库private void insertInfo(ArrayList insertList){SQLiteConnect

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");

热点排行