第一步,搞乙個資料庫幫助類,繼承sqliteopenhelper類
第二步,寫乙個activity,用來對資料庫實現相關操作
第三步,當然不可缺少布局檔案,相當簡單,就不再貼**了
第四步,執行結果
05-10 03:43:50.959: info/system.out(15420): 資料已經存在!
05-10 03:43:51.050: info/system.out(15420): create a database test_user and table users
05-10 03:43:51.089: info/system.out(15420): --------------------—create_database
05-10 03:44:03.409: info/system.out(15420): ----------------------insert
05-10 03:44:07.500: info/system.out(15420): query name ===>wangdan
05-10 03:44:12.690: info/system.out(15420): ----------------------tab_update
05-10 03:44:13.990: info/system.out(15420): query name ===>he shanshan
乙個SQLite3的小例子
寫了乙個比較簡單的sqlite3的簡單demo只實現了增加 更新 刪除 獲取全部資料 查詢 資料庫部分有詳細注釋 介面也比較簡陋主要是實現一下資料庫部分 部分 如下 獲取document目錄並返回資料庫目錄 nsstring datafilepath 建立,開啟資料庫 bool opendb 建立乙...
SQlite優化查詢的例子
上次講到了sqlite的查詢優化 中的具體實現,現在來看一下它的幾個例項 1 include stdio.h 2 include sqlite3.h 3 include 4 void query sqlite3 db,sqlite3 stmt stmt,char sql 5 6 int main i...
AJAX的小例子
檔案 div.html 檔案test.pl c perl bin perl.exe printenv demo cgi program which just prints its environment print content type text html n n print content t...