基本信息
源码名称:VB6 下使用SQLite 的完整例子(全面且好用)
源码大小:3.79M
文件格式:.rar
开发语言:ASP
更新时间:2019-05-05
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
VB6 下使用SQLite 的完整例子,最全面,最好用。 里面详细例举了各种情况下使用SQLite的例子。 将近20个源代码以及相关的VB用户自定义控件。
VB6 下使用SQLite 的完整例子,最全面,最好用。 里面详细例举了各种情况下使用SQLite的例子。 将近20个源代码以及相关的VB用户自定义控件。
Option Explicit Private DBName As String, Cnn As cConnection, Rs As cRecordset Private Sub Form_Load() DBName = App.Path & "\InsertTest.db" End Sub Private Sub Form_Resize() On Error Resume Next fDG.Move 45, (bInsert.Top bInsert.Height), ScaleWidth - 90, ScaleHeight - (bInsert.Top bInsert.Height) - 45 DG.Move 15, 240, fDG.Width - 45, fDG.Height - 255 End Sub Private Sub Form_Unload(Cancel As Integer) Set DG.DataSource = Nothing Set Rs = Nothing Set Cnn = Nothing End Sub Private Sub bInsert_Click() Dim i&, T!, D&, Cmd As cCommand Set Cnn = Nothing Set Rs = Nothing On Error Resume Next Kill DBName If Err Then Err.Clear Set Cnn = New_c.Connection Cnn.CreateNewDB DBName 'Cnn.Execute "Pragma journal_mode=OFF" Cnn.Execute "Create Table T (ID INTEGER Primary Key, Txt TEXT, " & _ "Dbl DOUBLE, Int INTEGER, " & _ "Date SHORTDATE, Bln BOOLEAN)" If Err Then MsgBox Err.Description: Err.Clear: Exit Sub T = HPTimer Set Cmd = Cnn.CreateCommand("Insert Into T Values(?,?,?,?,?,?)") If Err Then MsgBox Err.Description: Err.Clear: Exit Sub D = CLng(Now) Cnn.Synchronous = False Cnn.BeginTrans For i = 1 To 50000 Cmd.SetInt32 1, i 'ID Cmd.SetText 2, "SomeText_" & i 'Txt Cmd.SetDouble 3, i / 2 'Dbl Cmd.SetInt32 4, i * 10 'Int Cmd.SetShortDate 5, D: D = D 1 'Date Cmd.SetBoolean 6, i Mod 2 'Bln Cmd.Execute 'here we insert this new Record into Table 'T' If i Mod 1000 = 0 Then lTiming.Caption = Format$(i / 50000, "Percent") DoEvents End If Next i Cnn.CommitTrans Cnn.Synchronous = True If Err Then MsgBox Err.Description: Err.Clear: Exit Sub lTiming.Caption = Format$(HPTimer - T, "0.00 Seconds") lTiming.Refresh Set Rs = Cnn.OpenRecordset("Select * From T") If Err Then MsgBox Err.Description: Err.Clear: Exit Sub Set DG.DataSource = Rs.DataSource End Sub