tabledata.cls

来自「《VB6数据库开发指南》所有的例程的源码」· CLS 代码 · 共 44 行

CLS
44
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "clsTableData"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

'Module-level variables used to hold property values.  They are not accessible,
'or not "exposed", outside of the class directly.  Property Get statements are
'used to "expose" this data to other objects that may request it.
Private mlngNumRecords As Long
Private mdatWhenModified As Date
Private mdatWhenCreated As Date
Private mstrName As String

Public Sub ExtractStatusData(tblDef As TableDef)
    'This subroutine retrieves the property data from a given TableDef.
    mstrName = tblDef.Name
    mdatWhenModified = tblDef.LastUpdated
    mdatWhenCreated = tblDef.DateCreated
    mlngNumRecords = tblDef.RecordCount
End Sub
Property Get Name() As String
    Name = mstrName
End Property

Property Get NumRecords() As Long
    NumRecords = mlngNumRecords
End Property

Property Get WhenModified() As Date
    WhenModified = mdatWhenModified
End Property

Property Get WhenCreated() As Date
    WhenCreated = mdatWhenCreated
End Property


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?