(1)_Connection [方法] [属性] [事件] (2)_Recordset [方法] [属性] [杂项] [事件] (3)_Field [方法] [属性]


(1)._Connection (ADO for VC++ 语法)

方法
BeginTrans(long *TransactionLevel)
CommitTrans(void)
RollbackTrans(void)

Cancel(void)

Close(void)

Execute(BSTR CommandText, VARIANT *RecordsAffected, long Options, 
_ADORecordset **ppiRset)

Open(BSTR ConnectionString, BSTR UserID, BSTR Password, long Options)

OpenSchema(SchemaEnum Schema, VARIANT Restrictions, VARIANT SchemaID,
_ADORecordset **pprset)

属性
get_Attributes(long *plAttr)
put_Attributes(long lAttr)

get_CommandTimeout(LONG *plTimeout)
put_CommandTimeout(LONG lTimeout)

get_ConnectionString(BSTR *pbstr)
put_ConnectionString(BSTR bstr)

get_ConnectionTimeout(LONG *plTimeout)
put_ConnectionTimeout(LONG lTimeout)

get_CursorLocation(CursorLocationEnum *plCursorLoc)
put_CursorLocation(CursorLocationEnum lCursorLoc)

get_DefaultDatabase(BSTR *pbstr)
put_DefaultDatabase(BSTR bstr)

get_IsolationLevel(IsolationLevelEnum *Level)
put_IsolationLevel(IsolationLevelEnum Level)

get_Mode(ConnectModeEnum *plMode)
put_Mode(ConnectModeEnum lMode)

get_Provider(BSTR *pbstr)
put_Provider(BSTR Provider)

get_State(LONG *plObjState)

get_Version(BSTR *pbstr)

get_Errors(ADOErrors **ppvObject)

事件
BeginTransComplete(LONG TransactionLevel, ADOError *pError, 
EventStatusEnum *adStatus, _ADOConnection *pConnection)

CommitTransComplete(ADOError *pError, EventStatusEnum *adStatus, 
_ADOConnection *pConnection)

ConnectComplete(ADOError *pError, EventStatusEnum *adStatus, 
_ADOConnection *pConnection)

Disconnect(EventStatusEnum *adStatus, _ADOConnection *pConnection)

ExecuteComplete(LONG RecordsAffected, ADOError *pError, 
EventStatusEnum *adStatus, _ADOCommand *pCommand, 
_ADORecordset *pRecordset, _ADOConnection *pConnection)

InfoMessage(ADOError *pError, EventStatusEnum *adStatus, 
_ADOConnection *pConnection)

RollbackTransComplete(ADOError *pError, EventStatusEnum *adStatus, 
_ADOConnection *pConnection)

WillConnect(BSTR *ConnectionString, BSTR *UserID, BSTR *Password, 
long *Options, EventStatusEnum *adStatus, 
_ADOConnection *pConnection)

WillExecute(BSTR *Source, CursorTypeEnum *CursorType, 
LockTypeEnum *LockType, long *Options, 
EventStatusEnum *adStatus, _ADOCommand *pCommand, 
_ADORecordset *pRecordset, _ADOConnection *pConnection)

(2)._Recordset (ADO for VC++ 语法)

方法
AddNew(VARIANT FieldList, VARIANT Values)//创建可更新 Recordset 对象的新记录。

Cancel(void)

CancelBatch(AffectEnum AffectRecords)

CancelUpdate(void)

Clone(LockTypeEnum LockType, _ADORecordset **ppvObject)

Close(void)

CompareBookmarks(VARIANT Bookmark1, VARIANT Bookmark2, 
CompareEnum *pCompare)

Delete(AffectEnum AffectRecords)

Find(BSTR Criteria, LONG SkipRecords, SearchDirectionEnum SearchDirection, 
VARIANT Start)

GetRows(long Rows, VARIANT Start, VARIANT Fields, VARIANT *pvar)

GetString(StringFormatEnum StringFormat, long NumRows, BSTR ColumnDelimeter, 
BSTR RowDelimeter, BSTR NullExpr, BSTR *pRetString)

Move(long NumRecords, VARIANT Start)//移动 Recordset 对象中当前记录的位置。

MoveFirst(void)

MoveLast(void)

MoveNext(void)

MovePrevious(void)

NextRecordset(VARIANT *RecordsAffected, _ADORecordset **ppiRs)//清除当前 Recordset 对象并通过提前执行命令序列返回下一个记录集。

Open(VARIANT Source, VARIANT ActiveConnection, CursorTypeEnum CursorType, 
LockTypeEnum LockType, LONG Options)

Requery(LONG Options)//通过重新执行对象所基于的查询,更新 Recordset 对象中的数据。

Resync(AffectEnum AffectRecords, ResyncEnum ResyncValues)//从基本数据库刷新当前Recordset 对象中的数据。

Save(BSTR FileName, PersistFormatEnum PersistFormat)//将 Recordset 保存(持久)在文件中。

Supports(CursorOptionEnum CursorOptions, VARIANT_BOOL *pb)//确定指定的 Recordset 对象是否支持特定类型的功能。

Update(VARIANT Fields, VARIANT Values)//保存对 Recordset 对象的当前记录所做的所有更改。

UpdateBatch(AffectEnum AffectRecords)//将所有挂起的批更新写入磁盘。

属性
get_AbsolutePage(PositionEnum *pl)//指定当前记录所在的页。
put_AbsolutePage(PositionEnum Page)

get_AbsolutePosition(PositionEnum *pl)//指定 Recordset 对象当前记录的序号位置。
put_AbsolutePosition(PositionEnum Position)

get_ActiveCommand(IDispatch **ppCmd)//指示创建关联的 Recordset 对象的 Command 对象。

get_ActiveConnection(VARIANT *pvar)
put_ActiveConnection(VARIANT vConn)
putref_ActiveConnection(IDispatch *pconn)

get_BOF(VARIANT_BOOL *pb)

get_Bookmark(VARIANT *pvBookmark)//返回唯一标识 Recordset 对象中当前记录的书签,或者将Recordset 对象的当前记录设置为由有效书签所标识的记录。
put_Bookmark(VARIANT vBookmark)

get_CacheSize(long *pl)//指示缓存在本地内存中的 Recordset 对象的记录数。
put_CacheSize(long CacheSize)

get_CursorLocation(CursorLocationEnum *plCursorLoc)
put_CursorLocation(CursorLocationEnum lCursorLoc)

get_CursorType(CursorTypeEnum *plCursorType)
put_CursorType(CursorTypeEnum lCursorType)

get_DataMember(BSTR *pbstrDataMember)
put_DataMember(BSTR bstrDataMember)

get_DataSource(IUnknown **ppunkDataSource)
putref_DataSource(IUnknown *punkDataSource)

get_EditMode(EditModeEnum *pl)

get_EOF(VARIANT_BOOL *pb)

get_Filter(VARIANT *Criteria)//为 Recordset 中的数据指定筛选条件。
put_Filter(VARIANT Criteria)

get_LockType(LockTypeEnum *plLockType)//指示编辑过程中对记录使用的锁定类型。
put_LockType(LockTypeEnum lLockType)

get_MarshalOptions(MarshalOptionsEnum *peMarshal)
put_MarshalOptions(MarshalOptionsEnum eMarshal)

get_MaxRecords(long *plMaxRecords)//指示通过查询返回 Recordset 的记录的最大数目。
put_MaxRecords(long lMaxRecords)

get_PageCount(long *pl)

get_PageSize(long *pl)
put_PageSize(long PageSize)

get_RecordCount(long *pl)//指示  Recordset 对象中记录的当前数目。

get_Sort(BSTR *Criteria)//指定一个或多个 Recordset 以之排序的字段名,并指定按升序还是降序对字段进行排序。
put_Sort(BSTR Criteria)

get_Source(VARIANT *pvSource)
put_Source(BSTR bstrConn)
putref_Source(IDispatch *pcmd)

get_State(LONG *plObjState)

get_Status(long *pl)

get_StayInSync(VARIANT_BOOL *pbStayInSync)//在分级 Recordset 对象中指示当父行位置更改时,对基本子记录(即“子集”)的引用是否会更改。


put_StayInSync(VARIANT_BOOL bStayInSync)

get_Fields(ADOFields **ppvObject)

杂项
get_Collect(VARIANT Index, VARIANT *pvar)
put_Collect(VARIANT Index, VARIANT value)

事件
EndOfRecordset(VARIANT_BOOL *fMoreData, EventStatusEnum *adStatus, 
_ADORecordset *pRecordset)

FetchComplete(ADOError *pError, EventStatusEnum *adStatus, 
_ADORecordset *pRecordset)

FetchProgress(long Progress, long MaxProgress, EventStatusEnum *adStatus, 
_ADORecordset *pRecordset)

FieldChangeComplete(LONG cFields, VARIANT Fields, ADOError *pError, 
EventStatusEnum *adStatus, _ADORecordset *pRecordset)

MoveComplete(EventReasonEnum adReason, ADOError *pError, 
EventStatusEnum *adStatus, _ADORecordset *pRecordset)

RecordChangeComplete(EventReasonEnum adReason, LONG cRecords, 
ADOError *pError, EventStatusEnum *adStatus, 
_ADORecordset *pRecordset)

RecordsetChangeComplete(EventReasonEnum adReason, ADOError *pError, 
EventStatusEnum *adStatus, _ADORecordset *pRecordset)

WillChangeField(LONG cFields, VARIANT Fields, EventStatusEnum *adStatus, 
_ADORecordset *pRecordset)

WillChangeRecord(EventReasonEnum adReason, LONG cRecords, 
EventStatusEnum *adStatus, _ADORecordset *pRecordset)

WillChangeRecordset(EventReasonEnum adReason, EventStatusEnum *adStatus, 
_ADORecordset *pRecordset)

WillMove(EventReasonEnum adReason, EventStatusEnum *adStatus, 
_ADORecordset *pRecordset

(3)_Field (ADO for VC++ 语法)


方法
AppendChunk(VARIANT Data)

GetChunk(long Length, VARIANT *pvar)

属性
get_ActualSize(long *pl)

get_Attributes(long *pl)
put_Attributes(long lAttributes)

get_DataFormat(IUnknown **ppiDF)
put_DataFormat(IUnknown *piDF)

get_DefinedSize(long *pl)
put_DefinedSize(long lSize)

get_Name(BSTR *pbstr)

get_NumericScale(BYTE *pbNumericScale)
put_NumericScale(BYTE bScale)

get_OriginalValue(VARIANT *pvar)

get_Precision(BYTE *pbPrecision)
put_Precision(BYTE bPrecision)

get_Type(DataTypeEnum *pDataType)
put_Type(DataTypeEnum DataType)

get_UnderlyingValue(VARIANT *pvar)

get_Value(VARIANT *pvar)
put_Value(VARIANT Val)

你可能感兴趣的:(SQL)