| Home | How To | Online Documentation | Support | Download | Order |
|
|
SAString asString( )
const; operator SAString( ) const; asString method returns the value of current object (usually SAField or SAParam object) as string (SAString) data. operator SAString() substitute asString method to provide quick access for object's value. RemarksIf the value of current object is NULL, asString 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 bool (SA_dtBool), asString method returns "true" or "false" string (SAString object). If the value's type of current object is short (SA_dtShort), asString method converts it to decimal string (SAString object) like function printf("%hd", ...) does. If the value's type of current object is long (SA_dtLong), asString method converts it to decimal string (SAString object) like function printf("%ld", ...) does. If the value's type of current object is double (SA_dtDouble), asString method converts it to decimal string (SAString object) like function printf("%g", ...) does. If the value's type of current object is numeric (SA_dtNumeric), asString method converts it to decimal string (SAString object) without precision loss. If the value's type of current object is date-time (SA_dtDateTime), asString method converts it to string (SAString object) like function asctime(...) does. If the value's type of current object is string (SA_dtString, SA_dtLongChar, SA_dtCLob ), asString method returns the original object's value as SAString object. If the value's type of current object is binary (SA_dtBytes, SA_dtLongBinary, SA_dtBLob), asString method converts it to hexadecimal string ( 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 notesNo specific information. See alsoisNull, asBool, asShort, asLong, asDouble, asNumeric, asDateTime, asBytes, asLongBinary, asLongChar, asBLob, asCLob, asCursor, DataType Problems and QuestionsIf 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. |
||||||||||||||||||