AutoIt3开发的操作SQlite数据库的源码下载
部分源码
_SQLite_Startup () ;加载 SQLite.dll
If Not FileExists($SQLite_Data_Path) Then
SQLCreate()
EndIf
$GUI_Form = GUICreate($Title, 300, 435, -1, -1)
GUISetBkColor(0xECE9D8) ; will change background color
$GUI_ListBox = GUICtrlCreateListView("", 2, 2, 296, 309, 0x0010)
_GUICtrlListView_AddColumn($GUI_ListBox, "编号", 100, 0)
_GUICtrlListView_AddColumn($GUI_ListBox, "姓名", 80, 1)
_GUICtrlListView_AddColumn($GUI_ListBox, "年龄", 80, 1)
GUICtrlCreateLabel("编号 姓名 年龄", 34, 325, 240, 15)
$GUI_Input1 = GUICtrlCreateInput("", 10, 341, 73, 20)
$GUI_Input2 = GUICtrlCreateInput("", 88, 341, 73, 20)
$GUI_Input3 = GUICtrlCreateInput("", 166, 341, 73, 20)
$GUI_Input4 = GUICtrlCreateInput("", 88, 366, 73, 20)
$GUI_Input5 = GUICtrlCreateInput("", 88, 391, 73, 20)
$GUI_Button1 = GUICtrlCreateButton("读取", 246, 315, 48, 22, 0)
$GUI_Button2 = GUICtrlCreateButton("写入", 246, 340, 48, 22, 0)
$GUI_Button3 = GUICtrlCreateButton("查找", 246, 365, 48, 22, 0)
$GUI_Button4 = GUICtrlCreateButton("删除", 246, 390, 48, 22, 0)
GUICtrlCreateGroup("", 2, 307, 296, 107)
完整源码下载
Android SQLite Database本打算封装SQLite的,但是,发现实际上Android已经封装了一层,尤其是数据的增、删、查、改上,更是如此,所以,我后来只封装了一个连接层,负责打开、建立数据库,并返回一个SQLite的实例用来完成增、删、插、改等操作。
//----------- DBHelper -------------
package utility.db;
import ja ......
在SQLite on BlackBerry上,JDBC访问数据库,缺省是以UTF-8保存数据到数据库里面的,每个中文通常是3个字节保存到数据库上面的。
例子代码参考:
BlackBerry sample - SQLiteDemo。
注意:在插入中文的时候,请使用Statement.bind指令,在我的测试中,可以很好的保存中文数据。读取的时候只需要使用Result ......