易截截图软件、单文件、免安装、纯绿色、仅160KB

求高手指点,一个PDA程序,sqlite数据库连接不上,急

string ConStr="data source=C:\ceshi.db;verson=3;password=123456";
  SQLiteConnection MyConnection = new SQLiteConnection(ConStr);
  try
  {
  MyConnection.Open();
  MessageBox.Show("OK");

  using (SQLiteCommand SQLCom = new SQLiteCommand(MyConnection))
  {
  string strSQL = @"SELECT num from ceshi;";

  SQLCom.CommandText = strSQL;

  SQLiteDataReader SQLReader = SQLCom.ExecuteReader();

  while (SQLReader.NextResult() != false)
  {

  this.label1.Text = SQLReader["num"].ToString();

  }

  }

  MyConnection.Close();

  }

  catch (Exception err)
  {

  throw err;

  }


路径不对吧。
string ConStr="data source=C:\ceshi.db;verson=3;password=123456"; 

PDA上不存在类似C:\这东东吧。

引用
路径不对吧。
string ConStr="data source=C:\ceshi.db;verson=3;password=123456&


相关问答:

使用飞信虚拟.net环境,在使用SQLite时为什么报错呢

C# code:

System.Data.SQLite.SQLiteConnection conn = new SQLiteConnection(@"acs.db");
try
{
conn.Open();
}
......

delphi怎样连接Sqlite 增删改查

求delphi怎样连接Sqlite 增删改查例子
用ASqlite3Query,设置他的connection为ASqlite3DB
ASqlite3Query.Sql.text := 'insert into ....';
ASqlite3Query.Execsql;

sqlstr:='insert into stude ......

delphi怎样连接Sqlite 增删改查

delphi连接Sqlite 增删改查例子
数据库已经连通了, 插入会报错,no query specified
with dm.ASQLite3Query1 do
  begin
    dm.ASQLite3Query1.Close;
    dm.ASQLite3 ......

有关SQlite的一个问题

程序代码如下:
sqlTime = "select SUM(onlineTimeSpan) from T_OnlineTimeSum where ipAddress = :a AND onlineDate BETWEEN :b AND :c";
                ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号