📄 form1.ebf
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 6420
ClientLeft = 60
ClientTop = 345
ClientWidth = 9390
ScaleHeight = 6420
ScaleWidth = 9390
Begin VB.ListBox List1
Height = 5130
Left = 240
TabIndex = 1
Top = 960
Width = 9015
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 615
Left = 240
TabIndex = 0
Top = 240
Width = 2055
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const CEVT_I2 = 2
Const CEVT_UI2 = 18
Const CEVT_I4 = 3
Const CEVT_UI4 = 19
Const CEVT_FILETIME = 64
Const CEVT_LPWSTR = 31
Const CEVT_BLOB = 65
Const CEVT_BOOL = 11
Const CEVT_R8 = 5
Private Sub Command1_Click()
Dim a As PCDMAccessDB
Dim DBhandle As Long
Dim vali As Variant
Dim i, tCnt As Long
List1.Clear
Set a = CreateObject("PCDMDLL.PCDMAccessDB.1")
List1.AddItem "Class created"
a.AddProperty 0, True
a.AddProperty 1, False
a.AddProperty 2, False
a.CreateTable "", "Book843"
List1.AddItem "DB Created"
DBhandle = a.OpenTable("", "Book843", 0)
List1.AddItem "DB Opened, handle=" & DBhandle
a.AddNewRecord DBhandle
List1.AddItem "New Record Created"
a.SetValue 0, 42234
a.SetValue 1, Date
a.SetValue 2, "This is a string"
List1.AddItem "Record prepared to be written..."
a.WriteRecord DBhandle
List1.AddItem "...Record written"
a.MoveFirst DBhandle
tCnt = a.ReadRecord(DBhandle)
List1.AddItem "Properties read: " & tCnt
For i = 0 To tCnt - 1
vali = a.GetValue(i)
List1.AddItem "1st Value read: " & vali
Next
a.CloseTable DBhandle
List1.AddItem "DB Closed, all done."
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -