'這里演示全代碼操作,建議用控件
'--------------------------------------------------------------------------------
Sub Form1_Command2_BN_Clicked(hWndForm As hWnd, hWndControl As hWnd) '單擊
Dim As Long i, x, y
Print StrToWStr("") '如果你代碼中沒(méi)用到此函數(shù),就需要引用下函數(shù),不然會(huì)報(bào)錯(cuò)
Print wStrToUtf8("", 0) '如果你代碼中沒(méi)用到此函數(shù),需要引用下函數(shù),不然會(huì)報(bào)錯(cuò)
Dim db As SQLite3 Ptr 'DB 為后面使用數(shù)據(jù)用
If SQLiteOpen(db, App.Path & "test.db") Then
Print "失敗" 'SQLiteErrMsg(hDB)
Exit Sub
End If
Dim sql As String, rs() As String
Sql = "select * from features where id>0 LIMIT 20"
Print SQLiteSelect(db, sql, rs())
Print "---------- 列名顯示 --------------"
For x = 0 To UBound(rs, 2)
Print rs(0, x) & " , " ;
Next
Print
Print "---------- 內(nèi)容顯示 --------------------"
For y = 1 To UBound(rs, 1)
For x = 0 To UBound(rs, 2)
Print rs(y, x) & " , " ;
Next
Print
Next
SQLiteClose db
End Sub
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。