求高手指点,一个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:\这东东吧。
相关问答:
我用evc编写的程序,将对话框中的数据存入数据库,第一次可以存入,不过第二次输入的数据不能存入到数据库中。
下面是我的程序
UpdateData(TRUE); // TODO: Add your control notification handler code here ......
delphi连接Sqlite 增删改查例子
数据库已经连通了, 插入会报错,no query specified
with dm.ASQLite3Query1 do
begin
dm.ASQLite3Query1.Close;
dm.ASQLite3 ......
可以添加数据,但是点添加后会报.access violation at address 0049AB84 in module
源码
procedure Tstudent.add_buttonClick(Sender: TObject);
var
sqlstr:string;
begin
&nb ......
我用sqliteadmin建了一个数据库test.sdb,可是怎么也打不开提示如下错误:File opened that is not a database file
file is encrypted or is not a database。
我的连接字符串如下楼上的可不可以帮我看看
S ......