现遇到一问题,vb 在执行生成adodb.recordset的时候,会自动跳出,而且关闭VB,这是怎么回事呢?用的是ADO2.7,用的是一个扩展的CDataBase类,在
rs=CDataBase.OpenRecordSet(sql) 时跳出,关闭VB
objDatabase为当前CDataBase类对象
Public Function OpenRecordSet(pstrSqlString As String, Optional pCursorType As CursorTypeEnum = adOpenStatic, Optional pLockType As LockTypeEnum = adLockOptimistic) As ADODB.Recordset
Set OpenRecordSet = objDatabase.OpenRecordSet(pstrSqlString, pCursorType, pLockType)
End Function
rs=CDataBase.OpenRecordSet(sql) 时跳出,关闭VB
objDatabase为当前CDataBase类对象
Public Function OpenRecordSet(pstrSqlString As String, Optional pCursorType As CursorTypeEnum = adOpenStatic, Optional pLockType As LockTypeEnum = adLockOptimistic) As ADODB.Recordset
Set OpenRecordSet = objDatabase.OpenRecordSet(pstrSqlString, pCursorType, pLockType)
End Function
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货