首页 > 其他 > 详细

vb6异步ADO操作

时间:2014-08-19 12:35:44      阅读:458      评论:0      收藏:0      [点我收藏+]
Private withevents M_Conn as adodb.connection

Private CmdFinished as boolean
sub somesub
    AdoCmd.Execute , , adAsyncExecute
    do while not CmdFinished 
        doevents
    loop
end sub

Change the CmdFinished value on the connection_ExecuteComplete event and connection_WillExecute
Private Sub M_Conn_ExecuteComplete(ByVal RecordsAffected As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection)
    CmdFinished = True
End Sub

Private Sub M_Conn_WillExecute(Source As String, CursorType As ADODB.CursorTypeEnum, LockType As ADODB.LockTypeEnum, Options As Long, adStatus As ADODB.EventStatusEnum,ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection)
    CmdFinished = False
End Sub

 

vb6异步ADO操作,布布扣,bubuko.com

vb6异步ADO操作

原文:http://www.cnblogs.com/nanfei/p/3921635.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!