求高手指点,一个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:\这东东吧。
相关问答:
求delphi怎样连接Sqlite 增删改查例子
用ASqlite3Query,设置他的connection为ASqlite3DB
ASqlite3Query.Sql.text := 'insert into ....';
ASqlite3Query.Execsql;
sqlstr:='insert into stude ......
由于成本考虑用sqlite做数据库,可是在调用create方法时出错,好像是不能得到自增的ID怎么改啊
用mysql有什么成本?
用mysql不得买数据库啊。。。
都是一些小网站
id INTEGER NOT NULL PRIMARY KEY
......
我现在手头有这么一个问题,我想让一个操作sqlite3的程序在一个ARM板子上跑起来,板子上的os是wince5.0。
我是这么做的,我先从sqlite3主页下载源码下来,有这么3个文件:sqlite3.c、sqlite3.h、sqlite3ext.h , ......
之前 公司做网站使用的是asp+access,现在也在使用sql server 2005 + asp.net ,前者肯定要换代,后者sql server太庞大了,所以想换做其他的数据库,选免费开源的类型,只要满足普通企业宣传型网站,现在 看到了SQLi ......
如下语句 :
select TimeSpan from T_Table where onlineDate = '2009-12-2'
数据库里面有符合条件的值但是查不出来
如果改成如下:
select TimeSpan from T_Table where onlineDate = '200 ......