zoukankan      html  css  js  c++  java
  • vb6异步ADO操作

    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
  • 相关阅读:
    最近这段时间
    一元多项式的
    珍藏
    运行命令大全
    Google
    Windows Live Writer插件
    Word写论文的技
    安装Windows Live Writer后Ƃ
    比尔盖茨给人
    不经意的感悟
  • 原文地址:https://www.cnblogs.com/nanfei/p/3921635.html
Copyright © 2011-2022 走看看