ICursor



ICursor –. More..

#include <dbapi/dbapi.hpp>

Public Member Functions

virtual ~ICursor ()
Destructor. More..
virtual void SetParam (constCVariant &v, constCDBParamVariant &param)=0
Set input parameter. More..
virtual IResultSet * Open ()=0
Open cursor and get corresponding resultset. More..
virtual NCBI_DEPRECATEDCNcbiOstream & GetBlobOStream (unsigned int col, size_t blob_size, TBlobOStreamFlagsflags=0, size_t buf_size=0)=0
Get output stream for BLOB updates, requires BLOB column number. More..
virtual NCBI_DEPRECATEDCNcbiOstream & GetBlobOStream (unsigned int col, size_t blob_size, EAllowLog log_it, size_t buf_size=0)
virtual NCBI_DEPRECATEDIWriter * GetBlobWriter (unsigned int col, size_t blob_size, TBlobOStreamFlagsflags=0)=0
Get Blob Writer. More..
virtual NCBI_DEPRECATEDIWriter * GetBlobWriter (unsigned int col, size_t blob_size, EAllowLog log_it)
virtual void Update (conststring &table, conststring &updateSql)=0
Update statement for cursor. More..
virtual void Delete (conststring &table)=0
Delete statement for cursor. More..
virtual void Cancel ()=0
Cancel cursor. More..
virtual void Close ()=0
Close cursor. More..
virtual class IConnection * GetParentConn ()=0
Get the parent connection. More..

AlarmClock; BlockedNumberContract; BlockedNumberContract.BlockedNumbers; Browser; CalendarContract; CalendarContract.Attendees; CalendarContract.CalendarAlerts. The biggest problem was the Reset method because an ICursor doesn't have a reset method. I decided to set the cursor null and the recreated at the moment that MoveNext is called. This also makes sure the ICursor is only created when we really need it. Below you can find my full class.

Detailed Description

ICursor –.

Interface for a cursor.

Definition at line 563 of file dbapi.hpp.

Constructor & Destructor Documentation

~ICursor()

Destructor.

Definition at line 148 of file dbapi.cpp.

Member Function Documentation

Cancel()

Cancel cursor.

Implemented in CCursor.

Close()

Close cursor.

Implemented in CCursor.

Delete()

virtual void ICursor::Delete (conststring & table)
pure virtual

Delete statement for cursor.

Parameters
tabletable name.

Implemented in CCursor.

GetBlobOStream() [1/2]

virtual NCBI_DEPRECATEDCNcbiOstream& ICursor::GetBlobOStream (unsigned intcol,
size_t blob_size,
TBlobOStreamFlagsflags = 0,
size_t buf_size = 0
)
pure virtual

Get output stream for BLOB updates, requires BLOB column number.

Parameters
Icursor download
colColumn number.
blob_sizeblob_size is the size of the BLOB to be written.
flags
See also
EBlobOStreamFlags.
Parameters
Cursor changer
buf_sizeThe size of internal buffer, default 4096.
Deprecated:
Please use IStatement::GetBlobOStream instead.
See also
IStatement::GetBlobOStream

Implemented in CCursor.

Referenced by CCursor::GetBlobOStream(), and GetBlobOStream().

GetBlobOStream() [2/2]

CNcbiOstream & ICursor::GetBlobOStream (unsigned intcol,
size_t blob_size,
EAllowLoglog_it,
size_t buf_size = 0
)
virtual

Reimplemented in CCursor.

Definition at line 152 of file dbapi.cpp.

References eDisableLog, fBOS_SkipLogging, and GetBlobOStream().

GetBlobWriter() [1/2]

virtual NCBI_DEPRECATEDIWriter* ICursor::GetBlobWriter (unsigned intcol,
size_t blob_size,
TBlobOStreamFlagsflags = 0
)
pure virtual

Get Blob Writer.

Implementation of IWriter interface

Parameters
ICursor
colColumn number.
blob_sizeblob_size is the size of the BLOB to be written.
flags
See also
EBlobOStreamFlags.
Deprecated:
Please use IStatement::GetBlobWriter instead.
See also
IStatement::GetBlobWriter

Implemented in CCursor.

ICursor

Referenced by CCursor::GetBlobWriter(), and GetBlobWriter(). Sims 3 download game for mac.

GetBlobWriter() [2/2]

IWriter * ICursor::GetBlobWriter (unsigned intcol,
size_t blob_size,
EAllowLoglog_it
)
virtual

Reimplemented in CCursor.

Definition at line 160 of file dbapi.cpp.

References eDisableLog, fBOS_SkipLogging, and GetBlobWriter().

GetParentConn()

virtual class IConnection* ICursor::GetParentConn ()
pure virtual

Get the parent connection.

NOTE: If the original connections was cloned, returns cloned connection.

Implemented in CCursor.

Open()

Open cursor and get corresponding resultset.

Implemented in CCursor.

Referenced by CDbapiTest::Run().

SetParam()

virtual void ICursor::SetParam (constCVariant & v,
constCDBParamVariant & param
)
pure virtual

Set input parameter.

Parameters
vParameter value.
nameParameter name.

Implemented in CCursor.

Update()

virtual void ICursor::Update (conststring & table,
conststring & updateSql
)
pure virtual

Update statement for cursor.

Parameters
tabletable name.
updateSqlSQL statement.

Implemented in CCursor.

Referenced by CDbapiTest::Run().

The documentation for this class was generated from the following files:
  • include/dbapi/dbapi.hpp
  • src/dbapi/dbapi.cpp

Provides access to members that hand out enumerated rows, field collections and allows for the updating, deleting and inserting of rows.

Product Availability

Cursor

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Cursor Pointer

Members

Description
DeleteRowDelete the existing Row in the database corresponding to the current position of the cursor.
FieldsThe Fields Collection for this cursor.
FindFieldThe index of the field with the specified name.
FlushFlush any outstanding buffered writes to the database.
InsertRowInsert a new Row into the database using the property values in the input buffer. The object ID of the new Row, if there is one, is returned.
NextRowAdvance the position of the cursor by one and return the Row object at that position.
UpdateRowUpdate the existing Row in the database corresponding to the current position of the cursor.

CoClasses that implement ICursor

CoClasses and ClassesDescription
CursorEsri Cursor object.
FeatureCursorEsri Feature Cursor object.
RelQueryCursorA cursor that is opened from a RelQueryTable.
TemporalCursor (esriTrackingAnalyst)Controls settings for the temporal cursor.

Remarks

Cursors are forward only; they do not support backing up and retrieving rows that have already been retrieved or making multiple passes over data. If an application needs to make multiple passes over the data, the application needs to reexecute the query that returned the cursor. If both executions of the query are made within the same edit session (or database transaction with the appropriate level of isolation), the application is guaranteed not to see any changes made to the data by other concurrently executing applications.

Note that while a cursor is created in the client's memory after a call to methods such as ITable.Search or ITable.Insert, the DBMS cursor is not created until a call to NextRow (or a similar method) is made. This is why retrieving the first row may take longer than subsequent rows, and because underlying DBMS errors might be raised on the call, error handling is recommended.

When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.

Icursor Download

.NET Snippets

Perform Attribute Query | Load Network Locations | Zoom to Selected Globe FeaturesDefinition

.NET Samples

Export any network analysis class to a text file (Code Files: NAClassToTextfileCmd) | Closest facility solver (Code Files: frmClosestFacilitySolver) | ArcGIS Network Analyst extension Engine application (Code Files: frmLoadLocations) | Service area solver (Code Files: frmServiceAreaSolver) | Location-allocation solver (Code Files: frmLocationAllocationSolver) | Vehicle routing problem solver (Code Files: frmVRPSolver) | Origin-destination cost matrix solver (Code Files: frmODCostMatrixSolver) | Implementing extended criteria for some predefined schematic rules (Code Files: PlantWithoutEquipment) | Bind a geodatabase table to a .NET control (Code Files: TableWrapper) | Create camera flyby from path (Code Files: frmCameraPath) | Retrieve a color ramp from the SymbologyControl (Code Files: SymbolForm) | Migrating from VB6 to VB .NET for ArcGIS 10 (Code Files: ButtonAddInclscopy_table_selclsCopyTableSelection)

.NET Related Topics

Updating features | GeoData services | Geodatabase | GeoDatabaseUI | Geoprocessing services | How to create graph series with different color types | How to load data into a network analysis problem | How to work with geoprocessing services | How to zoom to selected features in globe | Joining data | Limiting query results and output | Migrating VB6 to VB.NET for ArcGIS 10 | Querying geodatabase tables | Sorting tables