TZASASQLDA Class Reference

Inheritance diagram for TZASASQLDA:

TInterfacedObject

List of all members.

Public Member Functions

 AllocateSQLDA (Word NumVars)
 Reallocate SQLDA to fields count length.
 FreeSQLDA ()
 Clear allocated data for SQLDA parameters.
Extended GetBigDecimal (const Integer Index)
 Return BigDecimal field value.
Boolean GetBoolean (const Integer Index)
 Return Boolean field value.
ShortInt GetByte (const Integer Index)
 Return Byte field value.
TByteDynArray GetBytes (const Integer Index)
 Return Bytes field value.
PASASQLDA GetData ()
 Return pointer to SQLDA structure.
TDateTime GetDate (const Integer Index)
 Return Date field value.
Double GetDouble (const Integer Index)
 Return Double field value.
Integer GetFieldCount ()
 Get fields count not allocated.
Word GetFieldIndex (const String Name)
 Return field index by it name.
Word GetFieldLength (const Word Index)
 Return field length.
string GetFieldName (const Word Index)
 Return Name for field.
Integer GetFieldScale (const Word Index)
 Return field scale.
TZSQLType GetFieldSqlType (const Word Index)
 Convert ASA sql type to SQLType.
Single GetFloat (const Integer Index)
 Return Float field value.
Integer GetInt (const Integer Index)
 Return Integer field value.
Int64 GetLong (const Integer Index)
 Return Long field value.
PChar GetPChar (const Integer Index)
 Return Pchar field value.
SmallInt GetShort (const Integer Index)
 Return Short field value.
string GetString (const Integer Index)
 Return String field value.
TDateTime GetTime (const Integer Index)
 Return Time field value.
TDateTime GetTimestamp (const Integer Index)
 Return Timestamp field value.
Variant GetValue (const Word Index)
 Return Variant field value.
 InitFields ()
 Allocate memory for SQLVar in SQLDA structure for every fields by it length.
Boolean IsAssigned (const Integer Index)
 Indicate sqldata assigned.
boolean IsBlob (const Word Index)
 Indicate blob field.
Boolean IsNull (const Integer Index)
 Indicate field null.
boolean IsNullable (const Word Index)
 Indicate nullable field.
 ReadBlobToMem (const Word Index, Pointer &Buffer, LongWord &Length)
 Read blob data to Buffer.
 ReadBlobToStream (const Word Index, TStream Stream)
 Read blob data to stream.
 ReadBlobToString (const Word Index, string &str)
 Read blob data to string.
 ReadBlobToVariant (const Word Index, Variant &Value)
 Read blob data to variant value.
 TZASASQLDA (IZASAPlainDriver PlainDriver, PZASASQLCA Handle, String CursorName, Word NumVars=StdVars)
 UpdateBigDecimal (const Integer Index, Extended Value)
 Set up parameter BigDecimal value.
 UpdateBoolean (const Integer Index, boolean Value)
 Set up parameter Boolean value.
 UpdateByte (const Integer Index, ShortInt Value)
 Set up parameter Byte value.
 UpdateBytes (const Integer Index, TByteDynArray Value)
 Set up parameter byte value.
 UpdateDate (const Integer Index, TDateTime Value)
 Set up parameter Date value.
 UpdateDateTime (const Integer Index, TDateTime Value)
 Set up parameter DateTime value.
 UpdateDouble (const Integer Index, Double Value)
 Set up parameter Double value.
 UpdateFloat (const Integer Index, Single Value)
 Set up parameter Float value.
 UpdateInt (const Integer Index, Integer Value)
 Set up parameter integer value.
 UpdateLong (const Integer Index, Int64 Value)
 UpdateNull (const Integer Index, boolean Value)
 UpdatePChar (const Integer Index, PChar Value)
 Set up parameter PChar value.
 UpdateShort (const Integer Index, SmallInt Value)
 Set up parameter short value.
 UpdateString (const Integer Index, string Value)
 Set up parameter String value.
 UpdateTime (const Integer Index, TDateTime Value)
 Set up parameter Time value.
 UpdateTimestamp (const Integer Index, TDateTime Value)
 Set up parameter Timestamp value.
 UpdateValue (const Word Index, Variant Value)
 Set up parameter Type value.
 WriteBlob (const Integer Index, TStream Stream)
 Write stream to blob field.
 ~TZASASQLDA ()

Protected Types

typedef array< TZASADECLTYPEFDeclType

Protected Member Functions

 ReadBlob (const Word Index, Pointer Buffer, LongWord Length)

Private Member Functions

 CheckIndex (const Word Index)
 Check range count fields.
 CheckRange (const Word Index)
 CreateException (string Msg)
 SetFieldType (const Word Index, Smallint ASAType, LongWord Len, Boolean SetDeclType=true)

Private Attributes

String FCursorName
PZASASQLCA FHandle
IZASAPlainDriver FPlainDriver
PASASQLDA FSQLDA


Detailed Description

Definition at line 315 of file ZDbcASAUtils.pas.


Member Typedef Documentation

typedef array<TZASADECLTYPE> TZASASQLDA::FDeclType [protected]

Definition at line 348 of file ZDbcASAUtils.pas.


Constructor & Destructor Documentation

TZASASQLDA::TZASASQLDA ( IZASAPlainDriver  PlainDriver,
PZASASQLCA  Handle,
String  CursorName,
Word  NumVars = StdVars 
)

Definition at line 767 of file ZDbcASAUtils.pas.

TZASASQLDA::~TZASASQLDA (  ) 

Definition at line 783 of file ZDbcASAUtils.pas.


Member Function Documentation

TZASASQLDA::AllocateSQLDA ( Word  NumVars  ) 

Reallocate SQLDA to fields count length.

Parameters:
Value the count fields

Definition at line 796 of file ZDbcASAUtils.pas.

TZASASQLDA::CheckIndex ( const Word  Index  )  [private]

Check range count fields.

If index out of range raised exception.

Parameters:
Index the index field

Definition at line 707 of file ZDbcASAUtils.pas.

TZASASQLDA::CheckRange ( const Word  Index  )  [private]

Definition at line 717 of file ZDbcASAUtils.pas.

TZASASQLDA::CreateException ( string  Msg  )  [private]

Definition at line 693 of file ZDbcASAUtils.pas.

TZASASQLDA::FreeSQLDA (  ) 

Clear allocated data for SQLDA parameters.

Definition at line 866 of file ZDbcASAUtils.pas.

Extended TZASASQLDA::GetBigDecimal ( const Integer  Index  ) 

Return BigDecimal field value.

Parameters:
Index the field index
Returns:
the field BigDecimal value

Definition at line 1694 of file ZDbcASAUtils.pas.

Boolean TZASASQLDA::GetBoolean ( const Integer  Index  ) 

Return Boolean field value.

Parameters:
Index the field index
Returns:
the field boolean value

Definition at line 1739 of file ZDbcASAUtils.pas.

ShortInt TZASASQLDA::GetByte ( const Integer  Index  ) 

Return Byte field value.

Parameters:
Index the field index
Returns:
the field Byte value

Definition at line 1784 of file ZDbcASAUtils.pas.

TByteDynArray TZASASQLDA::GetBytes ( const Integer  Index  ) 

Return Bytes field value.

Parameters:
Index the field index
Returns:
the field Bytes value

Definition at line 1829 of file ZDbcASAUtils.pas.

PASASQLDA TZASASQLDA::GetData (  ) 

Return pointer to SQLDA structure.

Definition at line 890 of file ZDbcASAUtils.pas.

TDateTime TZASASQLDA::GetDate ( const Integer  Index  ) 

Return Date field value.

Parameters:
Index the field index
Returns:
the field Date value

Definition at line 1856 of file ZDbcASAUtils.pas.

Double TZASASQLDA::GetDouble ( const Integer  Index  ) 

Return Double field value.

Parameters:
Index the field index
Returns:
the field Double value

Definition at line 1870 of file ZDbcASAUtils.pas.

Integer TZASASQLDA::GetFieldCount (  ) 

Get fields count not allocated.

Returns:
fields count

Definition at line 932 of file ZDbcASAUtils.pas.

Word TZASASQLDA::GetFieldIndex ( const String  Name  ) 

Return field index by it name.

Parameters:
Index the index fields
Returns:
the index field

Definition at line 964 of file ZDbcASAUtils.pas.

Word TZASASQLDA::GetFieldLength ( const Word  Index  ) 

Return field length.

Parameters:
Index the index fields
Returns:
the field lenth

Definition at line 983 of file ZDbcASAUtils.pas.

string TZASASQLDA::GetFieldName ( const Word  Index  ) 

Return Name for field.

Parameters:
Index the index fields
Returns:
the name

Definition at line 948 of file ZDbcASAUtils.pas.

integer TZASASQLDA::GetFieldScale ( const Word  Index  ) 

Return field scale.

Parameters:
Index the index fields
Returns:
the field scale

Definition at line 1001 of file ZDbcASAUtils.pas.

TZSQLType TZASASQLDA::GetFieldSqlType ( const Word  Index  ) 

Convert ASA sql type to SQLType.

Parameters:
Index the index fields
Returns:
the SQLType

Definition at line 1019 of file ZDbcASAUtils.pas.

Single TZASASQLDA::GetFloat ( const Integer  Index  ) 

Return Float field value.

Parameters:
Index the field index
Returns:
the field Float value

Definition at line 1915 of file ZDbcASAUtils.pas.

Integer TZASASQLDA::GetInt ( const Integer  Index  ) 

Return Integer field value.

Parameters:
Index the field index
Returns:
the field Integer value

Definition at line 1960 of file ZDbcASAUtils.pas.

Int64 TZASASQLDA::GetLong ( const Integer  Index  ) 

Return Long field value.

Parameters:
Index the field index
Returns:
the field Long value

Definition at line 2005 of file ZDbcASAUtils.pas.

PChar TZASASQLDA::GetPChar ( const Integer  Index  ) 

Return Pchar field value.

Parameters:
Index the field index
Returns:
the field PChar value

Definition at line 2050 of file ZDbcASAUtils.pas.

SmallInt TZASASQLDA::GetShort ( const Integer  Index  ) 

Return Short field value.

Parameters:
Index the field index
Returns:
the field Short value

Definition at line 2122 of file ZDbcASAUtils.pas.

string TZASASQLDA::GetString ( const Integer  Index  ) 

Return String field value.

Parameters:
Index the field index
Returns:
the field String value

Definition at line 2077 of file ZDbcASAUtils.pas.

TDateTime TZASASQLDA::GetTime ( const Integer  Index  ) 

Return Time field value.

Parameters:
Index the field index
Returns:
the field Time value

Definition at line 2167 of file ZDbcASAUtils.pas.

TDateTime TZASASQLDA::GetTimestamp ( const Integer  Index  ) 

Return Timestamp field value.

Parameters:
Index the field index
Returns:
the field Timestamp value

Definition at line 2181 of file ZDbcASAUtils.pas.

Variant TZASASQLDA::GetValue ( const Word  Index  ) 

Return Variant field value.

Parameters:
Index the field index
Returns:
the field Variant value

Definition at line 2213 of file ZDbcASAUtils.pas.

TZASASQLDA::InitFields (  ) 

Allocate memory for SQLVar in SQLDA structure for every fields by it length.

Definition at line 813 of file ZDbcASAUtils.pas.

Boolean TZASASQLDA::IsAssigned ( const Integer  Index  ) 

Indicate sqldata assigned.

Parameters:
Index the field index
Returns:
true if assigned field data

Definition at line 1678 of file ZDbcASAUtils.pas.

boolean TZASASQLDA::IsBlob ( const Word  Index  ) 

Indicate blob field.

Parameters:
Index the index fields
Returns:
true if blob field overwise false

Definition at line 903 of file ZDbcASAUtils.pas.

Boolean TZASASQLDA::IsNull ( const Integer  Index  ) 

Indicate field null.

Parameters:
Index the field index
Returns:
true if fied value NULL overwise false

Definition at line 1662 of file ZDbcASAUtils.pas.

boolean TZASASQLDA::IsNullable ( const Word  Index  ) 

Indicate nullable field.

Parameters:
Index the index fields
Returns:
true if field nullable overwise false

Definition at line 918 of file ZDbcASAUtils.pas.

TZASASQLDA::ReadBlob ( const Word  Index,
Pointer  Buffer,
LongWord  Length 
) [protected]

Definition at line 2264 of file ZDbcASAUtils.pas.

TZASASQLDA::ReadBlobToMem ( const Word  Index,
Pointer &  Buffer,
LongWord &  Length 
)

Read blob data to Buffer.

Parameters:
Index an filed index
Str destination string

Definition at line 2337 of file ZDbcASAUtils.pas.

TZASASQLDA::ReadBlobToStream ( const Word  Index,
TStream  Stream 
)

Read blob data to stream.

Parameters:
Index an filed index
Stream destination stream object

Definition at line 2389 of file ZDbcASAUtils.pas.

TZASASQLDA::ReadBlobToString ( const Word  Index,
string &  Str 
)

Read blob data to string.

Parameters:
Index an filed index
Str destination string

Definition at line 2365 of file ZDbcASAUtils.pas.

TZASASQLDA::ReadBlobToVariant ( const Word  Index,
Variant &  Value 
)

Read blob data to variant value.

Parameters:
Index an filed index
Value destination variant value

Definition at line 2415 of file ZDbcASAUtils.pas.

TZASASQLDA::SetFieldType ( const Word  Index,
Smallint  ASAType,
LongWord  Len,
Boolean  SetDeclType = true 
) [private]

Definition at line 728 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateBigDecimal ( const Integer  Index,
Extended  Value 
)

Set up parameter BigDecimal value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1324 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateBoolean ( const Integer  Index,
boolean  Value 
)

Set up parameter Boolean value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1059 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateByte ( const Integer  Index,
ShortInt  Value 
)

Set up parameter Byte value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1096 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateBytes ( const Integer  Index,
TByteDynArray  Value 
)

Set up parameter byte value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1448 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateDate ( const Integer  Index,
TDateTime  Value 
)

Set up parameter Date value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1489 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateDateTime ( const Integer  Index,
TDateTime  Value 
)

Set up parameter DateTime value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1521 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateDouble ( const Integer  Index,
Double  Value 
)

Set up parameter Double value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1286 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateFloat ( const Integer  Index,
Single  Value 
)

Set up parameter Float value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1248 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateInt ( const Integer  Index,
Integer  Value 
)

Set up parameter integer value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1172 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateLong ( const Integer  Index,
Int64  Value 
)

TZASASQLDA::UpdateNull ( const Integer  Index,
boolean  Value 
)

TZASASQLDA::UpdatePChar ( const Integer  Index,
PChar  Value 
)

Set up parameter PChar value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1362 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateShort ( const Integer  Index,
SmallInt  Value 
)

Set up parameter short value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1134 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateString ( const Integer  Index,
string  Value 
)

Set up parameter String value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1405 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateTime ( const Integer  Index,
TDateTime  Value 
)

Set up parameter Time value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1505 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateTimestamp ( const Integer  Index,
TDateTime  Value 
)

Set up parameter Timestamp value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1566 of file ZDbcASAUtils.pas.

TZASASQLDA::UpdateValue ( const Word  Index,
Variant  Value 
)

Set up parameter Type value.

Parameters:
Index the target parameter index
Value the source value

Definition at line 1581 of file ZDbcASAUtils.pas.

TZASASQLDA::WriteBlob ( const Integer  Index,
TStream  Stream 
)

Write stream to blob field.

Parameters:
Index an index field number
Stream the souse data stream

Definition at line 1624 of file ZDbcASAUtils.pas.


Member Data Documentation

String TZASASQLDA::FCursorName [private]

Definition at line 326 of file ZDbcASAUtils.pas.

Definition at line 324 of file ZDbcASAUtils.pas.

Definition at line 322 of file ZDbcASAUtils.pas.

Definition at line 320 of file ZDbcASAUtils.pas.


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

Generated on Wed Dec 30 08:42:49 2009 for zeoslib by  doxygen 1.5.7.1