| Home | How To | Online Documentation | Support | Download | Order |
|
|
SANumeric asNumeric() const; operator SANumeric( ) const; asNumeric method returns the value of current object (usually SAField or SAParam object) as SANumeric data. operator SANumeric() substitute asNumeric method to provide quick access for object's value. RemarksIf the value of current object is NULL, asNumeric method returns 0. Use SAValueRead::isNull method to make sure if the value is NULL or not. If the value's type of current object is exact numeric value (SA_dtNumeric), asNumeric method returns the original value with no conversion. If the value's type of current object is bool (SA_dtBool), short (SA_dtShort), double (SA_dtDouble) or long (SA_dtLong), asNumeric method converts it to SANumeric . If the value's type of current object is string (SA_dtString), asNumeric method tries to convert it from SAChar* value. If the conversion is possible and correct, asNumeric converts to SANumeric from SAChar* value. If conversion is incorrect asNumeric method throws an exception. If the value's type of current object is any data type except the described above, 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, asDateTime, asString, 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. |
||||||||||||||||||