Home How To Online Documentation Support Download Order

 

 

 

SACommand
SAConnection
SAException
SAField
SAParam

SAString
SADateTime
SANumeric

Enums and Typedefs

  

Usage

Class Members

Examples

SAValueRead::asBytes

SAString  asBytes( ) const;
throw (SAException);

Returns the value of current object (usually SAField or SAParam object) as binary string data (SAString).

Remarks

If the value of current object is NULL, asBytes method returns an empty string. Use SAValueRead::isNull method to make sure if the value is NULL or not.

If the value's type of current object is string (SA_dtString), bytes (SA_dtBytes), long binary (SA_dtLongBinary), long character (SA_dtLongChar), BLob (SA_dtBLob) or CLob (SA_dtCLob), asBytes method returns the object's value as SAString object.

If the value's type of current object is bool (SA_dtBool ), short (SA_dtShort), long (SA_dtLong), double (SA_dtDouble), numeric (SA_dtNumeric) or date-time (SA_dtDateTime), asBytes method returns a block of data with size sizeof(value's type) as SAString object.

If the value's type of current object is cursor (SA_dtCursor), the result is undefined and debug version asserts.

Use SAValueRead::DataType method to get the value's type of SAValueRead object.

Server specific notes

No specific information.

See also

isNull, asBool, asShort, asLong, asDouble, asNumeric, asDateTime, asString, asLongBinary, asLongChar, asBLob, asCLob, asCursor, DataType

SAString

SADataType_t

Error handling

Problems and Questions

If you haven't found the answer to your questions or have some problems on using the Library, please, send e-mail to howto@sqlapi.com.