sqlite用於訪問程式中固定的值
2 新增sqlite的引用
3 使用。
4 如果成功,我們可以通過火狐瀏覽器的sqlite manager進行檢視表資料。
**如下:
usingsystem;
using
system.collections.generic;
using
system.componentmodel;
using
system.data;
using
system.drawing;
using
system.linq;
using
system.text;
using
system.windows.forms;
namespace
od.frm
public
string
createdefaultdatabase()
return
"success";
}private
void startfrm_load(object
sender, eventargs e)
private
void
methodcompleted(iasyncresult asyncresult)
}}
usingsystem;
using
system.collections.generic;
using
system.linq;
using
system.text;
using
system.data;
using
od.dal;
using
system.collections;
namespace
od.bll
return
true
; }
//////
建立表
/// ///
create table t(...
public
bool createtable(string
commandtext)
//////
執行多條sql語句,實現資料庫事務。
/// ///
多條sql語句
public
void
executesqltran(arraylist sqlstringlist)
//////
執行一條語句
/// public
int add(string
strsql)
//////
返回乙個dataset結果集
/// ///
///public dataset getlist(string
strsql)
//////
返回首行首列
/// ///
///public
object getscalar(string
strsql)
//////
是否存在該記錄
/// public
bool exists(string
strsql)
//////
查詢本地資料庫是否存在
/// public
static
bool
existsdatabase()
//////
插入或更新店鋪
/// ///
店鋪編號
///平台id
///店鋪名 ///
//////
sessionkey/accesstoken
///createtime
///public
createtime)
}}
usingsystem;
using
system.collections.generic;
using
system.linq;
using
system.text;
using
system.data;
using
system.collections;
using
system.io;
namespace
od.sqlitedata
//////
建立表
/// ///
create table t(...
public
bool createtable(string
commandtext)
//////
執行多條sql語句,實現資料庫事務。
/// ///
多條sql語句
public
void
executesqltran(arraylist sqlstringlist)
//////
執行一條語句
/// public
int add(string
strsql)
//////
返回乙個dataset結果集
/// ///
///public dataset getlist(string
strsql)
//////
返回首行首列
/// ///
///public
object getscalar(string
strsql)
//////
是否存在該記錄
/// public
bool exists(string
strsql)
//////
查詢本地資料庫是否存在
/// public
static
bool
existsdatabase()
}}
usingsystem;
using
system.collections.generic;
using
system.linq;
using
system.text;
using
system.data;
using
od.dal;
using
system.collections;
namespace
od.bll
/**************************tyler start***********************************
*/#region 訂單狀態表
//////建立訂單狀態表
/// public
void
createtradestatetable()}}
}
在c 中使用SQlite
1.生成 lib 檔案 第一步 找到lib.exe所在目錄 一般都在x program files microsoft visual studio vc98 bin下,在 執行 中輸入cmd,然後切換到該目錄下 第二步 使用lib命令生成.lib檔案 很多網頁上都介紹,使用lib def sqlit...
SQLite在VC下的使用
一 sqlite簡介 sqlite 是用c語言編寫的開源資料庫,主要用於嵌入式,你也可以把它整合在自己的桌面程式中,也有人將其替代access,用作後台資料庫。sqlite 支援多數sql92標準,例如 索引 限制 觸發和檢視支援。支援 null integer real text 和 blob 資...
SQLite在VC下的使用
一 sqlite簡介 sqlite 是用c語言編寫的開源資料庫,主要用於嵌入式,你也可以把它整合在自己的桌面程式中,也有人將其替代access,用作後台資料庫。sqlite 支援多數sql92標準,例如 索引 限制 觸發和檢視支援。支援 null integer real text 和 blob 資...