⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 《Windows CE 权威指南》(作者:(美)CHRIS MUENCH
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   6090
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6615
   LinkTopic       =   "Form1"
   ScaleHeight     =   6090
   ScaleWidth      =   6615
   StartUpPosition =   3  'Windows Default
   Begin VB.ListBox List1 
      Height          =   5130
      Left            =   120
      TabIndex        =   1
      Top             =   840
      Width           =   6375
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   615
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   2175
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim a As Object
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 "", "Book924"
List1.AddItem "DB Created"
    DBhandle = a.OpenTable("", "Book924", 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 + -