分享

VFB综合例题:sqlite数据库

 nxhujiee 2020-07-09
'这里演示全代码操作,建议用控件       
'--------------------------------------------------------------------------------
Sub Form1_Command2_BN_Clicked(hWndForm As hWnd, hWndControl As hWnd '单击
    
Dim As Long i, x, y
    Print StrToWStr(""   '如果你代码中没用到此函数,就需要引用下函数,不然会报错
    
Print wStrToUtf8("", 0'如果你代码中没用到此函数,需要引用下函数,不然会报错
    
Dim db As SQLite3 Ptr 'DB 为后面使用数据用
    
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 To UBound(rs, 2)
        
Print rs(0, x" ;
    Next
    Print
    Print 
"---------- 内容显示 --------------------"
    For To UBound(rs, 1)
        
For To UBound(rs, 2)
            
Print rs(y, x" ;
        Next
        Print
    Next
    
SQLiteClose db
End Sub 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多