惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 奇远

网络记事本 用google检索email 读注册表 - 奇远 - 博客园 Crystal Report 部署 按钮控件数组 读写xml - 奇远 - 博客园 vb.net发邮件 - 奇远 - 博客园 VB.NET程序只能启动一次 - 奇远 - 博客园 dataset遍历表中的数据 - 奇远 - 博客园 vb.net自定义纸张大小 - 奇远 - 博客园 怎样使用水晶报表的推模式? SQL查询语句精华使用简要 vb.net事务处理 各种连接字符串设置 CREATE PROCEDURE 将数字串转换为中文金额字符串 中文转换成拼音函数 运行时动态添加和删除控件 VB读写注册表
VB类Class设计
奇远 · 2005-10-15 · via 博客园 - 奇远

Private Sub Class_Initialize()
    'load
    ' Indicate the the database is not yet open
    mblnRecSetOpen = False
    ' Clear all object variables
    Call ClearObject
   
End Sub

Private Sub Class_Terminate()
    'unload

    ' We don't really care about errors when cleaning up.
    On Error Resume Next
    ' Close the recordset
    mrecExpense.Close
    ' Close the expense database
    mdbExpense.Close
    ' Reset the error handler
    On Error GoTo 0
    Exit Sub
   
End Sub

'属性
Public Property Let strEmployeeId(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.strEmployeeId = 5
    mvarstrEmployeeId = vData
End Property

Public Property Get strEmployeeId() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.strEmployeeId
    strEmployeeId = mvarstrEmployeeId
End Property

'方法
Public Function MoveLast() As String
' Retrieve the last record

    On Error GoTo MoveError
   
    With mrecExpense
        If True = .BOF _
        And True = .EOF Then
            ' Empty recordset
            MoveLast = "EOF"
        Else
            ' Move to the last record
            .MoveLast
            Call GetRecordset(mrecExpense)
            MoveLast = "OK"
        End If
    End With
   
    Exit Function

MoveError:
    ' Return the error description
    MoveLast = Err.Description
    Err.Clear
    Exit Function
End Function

Private Sub SetRecordset(recExp As Recordset)
' Copies current values to Recordset

    With recExp
        !EmployeeId = mvarstrEmployeeId
        !ExpenseType = mvarstrExpenseType
        !AmountSpent = mvarcurAmountSpent
        !Description = mvarstrDescription
        !DatePurchased = mvardtmDatePurchased
        !DateSubmitted = mvardtmDateSubmitted
    End With
   
End Sub