📄 mdlopenrecord.bas
字号:
Attribute VB_Name = "mdlOpenRecord"
Option Explicit
Public Function OpenRSClient(ByVal sSQL As String) As ADODB.Recordset
On Error GoTo ErrHandle
'-----------------------
'返回sSQL所指定的记录集
'-----------------------
Dim tempRS As New ADODB.Recordset
tempRS.CursorLocation = adUseClient
tempRS.Open sSQL, GDB, adOpenKeyset, adLockOptimistic
Set OpenRSClient = tempRS
Exit Function
ErrHandle:
End Function
Public Function OpenRSBatch(ByVal sSQL As String) As ADODB.Recordset
On Error GoTo ErrHandle
'-----------------------
'返回sSQL所指定的记录集
'-----------------------
Dim tempRS As New ADODB.Recordset
tempRS.CursorLocation = adUseClient
tempRS.Open sSQL, GDB, adOpenStatic, adLockBatchOptimistic
Set OpenRSBatch = tempRS
Exit Function
ErrHandle:
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -