打开记录集~~
Public Function OpenRecordset(ByVal Rec As ADODB.Recordset, ByVal Conn As ADODB.Connection, ByVal Source As String, ByVal sErrorInfo As String, Optional ByVal CursorType As Integer = ADODB.CursorTypeEnum.adOpenDynamic, Optional ByVal LockType As Integer = ADODB.LockTypeEnum.adLockBatchOptimistic) As Boolean
'打开数据库记录
Try
Rec.CursorType = ADODB.CursorTypeEnum.adOpenDynamic
Rec.CursorLocation = ADODB.CursorLocationEnum.adUseClient
Rec.Open(Source, Conn, CursorType, LockType)
OpenRecordset = True
sErrorInfo = ""
Catch ex As Exception
sErrorInfo = ex.Message
OpenRecordset = False
End Try
End Function
以前用的VB,几个参数都是设置得很好,现在刚开始学Net,若干参数都不会设置了;请帮助我改动我所设置和传递的参数,有什么不妥当的地方??
默认实现:使用客户端游标,并且可以自由读写的,可以得到记录总数的;