| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
TeAdoPortal Class Reference

A portal to access a ADO database. More...

`#include <TeAdoDB.h>`

Inheritance diagram for TeAdoPortal:

List of all members.

## Public Member Functions

| TeAdoPortal ()
| TeAdoPortal (TeDatabase *pDatabase)
| ~TeAdoPortal ()
bool | isConnected ()
bool | isEOF ()
bool | moveFirst ()
bool | moveNext ()
bool | query (const string &qry, TeCursorLocation l=TeSERVERSIDE, TeCursorType t=TeBIDIRECTIONAL, TeCursorEditType e=TeREADWRITE, TeCursorDataType dt=TeTEXTCURSOR)
| Executes a SQL query that opens a record set.
bool | fetchRow ()
| Fetchs the next row in a record set that shouldve been previously opened.
bool | fetchRow (int i)
| Fetchs a particular row.
void | freeResult ()
| Frees the current record set.
bool | fetchGeometry (TePolygon &pol)
bool | fetchGeometry (TePolygon &pol, const unsigned int &initIndex)
bool | fetchGeometry (TeLine2D &line)
bool | fetchGeometry (TeLine2D &line, const unsigned int &initIndex)
bool | fetchGeometry (TeNode &n)
bool | fetchGeometry (TeNode &n, const unsigned int &initIndex)
bool | fetchGeometry (TePoint &p)
bool | fetchGeometry (TePoint &p, const unsigned int &initIndex)
char * | getData (int i)
| Gets the value of the i-th attribute as a literal.
char * | getData (const string &s)
| Gets the value of a named attribute as a literal.
double | getDouble (int i)
| Gets the value of the i-th attribute as a double.
double | getDouble (const string &s)
| Gets the value of a named attribute as a double.
int | getInt (int i)
| Gets the value of the i-th attribute as an integer.
int | getInt (const string &s)
| Gets the value of a named attribute as an integer.
bool | getBool (const string &s)
| Gets the value of a named attribute as a boolean.
bool | getBool (int i)
| Gets the value of the i-th attribute as a boolean.
bool | getBlob (const string &s, unsigned char *&data, long &size)
| Gets the value of a named BLOB attribute.
bool | getBlob (int i, unsigned char *&data, long &size)
bool | BlobToLine (TeLine2D &line)
bool | getRasterBlock (unsigned long &size, unsigned char *ptData)
TeTime | getDate (int i)
| Gets the value of the i-th attribute as a date.
TeTime | getDate (const string &s)
| Gets the value of a named attribute as a date.
string | getDateAsString (int i)
| Returns.
string | getDateAsString (const string &s)
| Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.

## Public Attributes

ADODB::_ConnectionPtr | connection_
ADODB::_RecordsetPtr | recset_

## Protected Member Functions

TeLinearRing | getLinearRing ()

## Protected Attributes

_bstr_t | bvalue_
string | error_message_
long | error_num_
long | curRow_

## Detailed Description

A portal to access a ADO database.

## Constructor & Destructor Documentation

TeAdoPortal::TeAdoPortal | ( |  | ) |

TeAdoPortal::TeAdoPortal | ( | TeDatabase * | pDatabase | ) |

TeAdoPortal::~TeAdoPortal | ( |  | ) |

## Member Function Documentation

bool TeAdoPortal::BlobToLine | ( | TeLine2D & | line | ) |

bool TeAdoPortal::fetchGeometry | ( | TePolygon & | pol,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

bool TeAdoPortal::fetchGeometry | ( | TePoint & | p | ) | `[virtual]`

Implements TeDatabasePortal.

Reimplemented in TeSqlServerSpatialPortal.

bool TeAdoPortal::fetchGeometry | ( | TePoint & | p,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

Reimplemented in TeSqlServerSpatialPortal.

bool TeAdoPortal::fetchGeometry | ( | TePolygon & | pol | ) | `[virtual]`

Implements TeDatabasePortal.

Reimplemented in TeSqlServerSpatialPortal.

bool TeAdoPortal::fetchGeometry | ( | TeLine2D & | line,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

bool TeAdoPortal::fetchGeometry | ( | TeLine2D & | line | ) | `[virtual]`

Implements TeDatabasePortal.

Reimplemented in TeSqlServerSpatialPortal.

bool TeAdoPortal::fetchGeometry | ( | TeNode & | n | ) | `[virtual]`

Implements TeDatabasePortal.

bool TeAdoPortal::fetchGeometry | ( | TeNode & | n,
|  | const unsigned int & | initIndex
| ) |  | `[virtual]`

Reimplemented from TeDatabasePortal.

bool TeAdoPortal::fetchRow | ( |  | ) | `[virtual]`

Fetchs the next row in a record set that shouldve been previously opened.

Implements TeDatabasePortal.

bool TeAdoPortal::fetchRow | ( | int | i | ) | `[virtual]`

Fetchs a particular row.

Implements TeDatabasePortal.

void TeAdoPortal::freeResult | ( |  | ) | `[virtual]`

Frees the current record set.

Implements TeDatabasePortal.

bool TeAdoPortal::getBlob | ( | const string & | s,
|  | unsigned char *& | data,
|  | long & | size
| ) |  | `[virtual]`

Gets the value of a named BLOB attribute.

Implements TeDatabasePortal.

bool TeAdoPortal::getBlob | ( | int | i,
|  | unsigned char *& | data,
|  | long & | size
| ) |  |

bool TeAdoPortal::getBool | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as a boolean.

Implements TeDatabasePortal.

bool TeAdoPortal::getBool | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a boolean.

Implements TeDatabasePortal.

char * TeAdoPortal::getData | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as a literal.

Implements TeDatabasePortal.

char * TeAdoPortal::getData | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a literal.

Implements TeDatabasePortal.

TeTime TeAdoPortal::getDate | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a date.

Implements TeDatabasePortal.

Reimplemented in TeOraclePortal, TeSqlServerPortal, and TeSqlServerSpatialPortal.

TeTime TeAdoPortal::getDate | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as a date.

Implements TeDatabasePortal.

Reimplemented in TeOraclePortal, TeSqlServerPortal, and TeSqlServerSpatialPortal.

string TeAdoPortal::getDateAsString | ( | int | i | ) | `[virtual]`

Returns.

Implements TeDatabasePortal.

Reimplemented in TeOraclePortal, TeSqlServerPortal, and TeSqlServerSpatialPortal.

string TeAdoPortal::getDateAsString | ( | const string & | s | ) | `[virtual]`

Gets the of a date/time attribute as a string formatted as accepted in further SQL statements.

Implements TeDatabasePortal.

Reimplemented in TeOraclePortal, TeSqlServerPortal, and TeSqlServerSpatialPortal.

double TeAdoPortal::getDouble | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as a double.

Reimplemented from TeDatabasePortal.

double TeAdoPortal::getDouble | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as a double.

Reimplemented from TeDatabasePortal.

int TeAdoPortal::getInt | ( | const string & | s | ) | `[virtual]`

Gets the value of a named attribute as an integer.

Reimplemented from TeDatabasePortal.

int TeAdoPortal::getInt | ( | int | i | ) | `[virtual]`

Gets the value of the i-th attribute as an integer.

Reimplemented from TeDatabasePortal.

TeLinearRing TeAdoPortal::getLinearRing | ( |  | ) | `[protected]`

bool TeAdoPortal::getRasterBlock | ( | unsigned long & | size,
|  | unsigned char * | ptData
| ) |  | `[virtual]`

Implements TeDatabasePortal.

bool TeAdoPortal::isConnected | ( |  | ) |

bool TeAdoPortal::isEOF | ( |  | ) |

bool TeAdoPortal::moveFirst | ( |  | ) |

bool TeAdoPortal::moveNext | ( |  | ) |

bool TeAdoPortal::query | ( | const string & | qry,
|  | TeCursorLocation | l = `TeSERVERSIDE`,
|  | TeCursorType | t = `TeBIDIRECTIONAL`,
|  | TeCursorEditType | e = `TeREADWRITE`,
|  | TeCursorDataType | dt = `TeTEXTCURSOR`
| ) |  | `[virtual]`

Executes a SQL query that opens a record set.

Implements TeDatabasePortal.

Reimplemented in TeOraclePortal.

## Member Data Documentation

_bstr_t TeAdoPortal::bvalue_`[protected]`

ADODB::_ConnectionPtr TeAdoPortal::connection_

long TeAdoPortal::curRow_`[protected]`

string TeAdoPortal::error_message_`[protected]`

long TeAdoPortal::error_num_`[protected]`

ADODB::_RecordsetPtr TeAdoPortal::recset_

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/ado/TeAdoDB.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/ado/TeAdoDB.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines