''''--------------------------------------------------------------- Public Sub CloseRecordSet() if objAdoRecordSet.State=1 then objAdoRecordSet.Close end if End Sub
Public Sub SetConnection(objConnection) set objAdoConnection=objConnection set objAdoCommand.ActiveConnection = objAdoConnection End Sub
Public Sub OpenRecordSet(byval sql) CloseRecordSet() objAdoCommand.CommandText=sql set objAdoRecordSet=objAdoCommand.Execute() End Sub
Public Sub OpenRecordSet2(sql,conn,CursorType,LockType) CloseRecordSet() objAdoRecordSet.Open sql,conn,CursorType,LockType End Sub
Public Sub cmdExecute(byval sql) objAdoCommand.CommandText=sql objAdoCommand.Execute() End Sub
''''--------------------------------------------------------------- Public Function GetFieldValue(byval fieldName) GetFieldValue=objAdoRecordSet(fieldName).Value End Function
Public Function GetFieldName(byval fieldOrder) GetFieldName=objAdoRecordSet(fieldOrder).name End Function
Public Function SetFieldValue(fieldName,fieldValue) objAdoRecordSet(fieldName).Value=fieldValue End Function
Public Function GetBinaryField(fieldName)
End Function
Public Function SetBinaryField(fieldName,fieldValue)
End Function
Public Function RsUpDate() objAdoRecordSet.Update End Function
Public Function GetRecordSet() set GetRecordSet=objAdoRecordSet End Function ''''--------------------------------------------------------------- Function IsEmpty() IsEmpty=(objAdoRecordSet.BOF and objAdoRecordSet.EOF) End Function
Function IsEof() IsEof=objAdoRecordSet.EOF End Function
Function IsBof() IsBof=objAdoRecordSet.BOF End Function
''''--------------------------------------------------------------- Function MoveFirst() objAdoRecordSet.MoveFirst End Function
Function MovePrevious() if (not objAdoRecordSet.BOF) then objAdoRecordSet.MovePrevious end if End Function
Function MoveNext() if (not objAdoRecordSet.BOF) then objAdoRecordSet.MoveNext end if End Function
Function MoveLast() objAdoRecordSet.MoveLast End Function
End Class ''''################################################################# Function CreateCAdoCommand() set CreateCAdoCommand=new CAdoCommand End Function Class CAdoCommand
Public objAdoCommand
''''============================================================== Public Property Get cmdCommandType cmdCommandType=objAdoCommand.CommandType End Property
Public Property Let cmdCommandType(ByVal cmdType) objAdoCommand.CommandType=cmdType End Property