Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

SQLValueReadMBS.asBool as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value of current object as bool data.
Notes:
f the value of current object is NULL, asBool method returns false. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is bool (kDataTypeBool), asBool method returns the original value with no conversion.

If the value's type of current object is short (kDataTypeShort), long (kDataTypeLong) or double (kDataTypeDouble), asBool method converts it to bool data type. Conversion returns false if the value is 0; true otherwise.

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 DataType method to get the value's type of SQLValueRead object.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asDouble as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: returns the value as Double data.
Notes:
If the value of current object is NULL, asDouble method returns 0. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is double (kDataTypeDouble), asDouble method returns the original value with no conversion.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), long (kDataTypeLong) or numeric (kDataTypeNumeric), asDouble method converts it to double ( kDataTypeDouble) data type.

If the value's type of current object is string (kDataTypeString), asDouble method tries to convert it to double value. If the conversion is possible and correct, asDouble returns kDataTypeDouble value. If conversion is incorrect asDouble method throws an exception.

If the value's type of current object is kDataTypeDateTime, asDouble method converts it to standard double representation. Days are represented by whole number increments starting with 30 December 1899, midnight as time zero. Hour values are expressed as the absolute value of the fractional part of the number. See SQLDateTime::operator double() for more detailes.

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 DataType method to get the value's type of SQLValueRead object.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asLong as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as long data.
Notes:
If the value of current object is NULL, asLong method returns 0. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is long ( kDataTypeLong), asLong method returns the original value with no conversion.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), double (kDataTypeDouble) or numeric (kDataTypeNumeric), asLong method converts it to long data type. Note, that in this case the returned value can be truncated.

If the value's type of current object is string (kDataTypeString), asLong method tries to convert it to long ( kDataTypeLong) value. If the conversion is possible and correct, asLong returns kDataTypeLong value. If conversion is incorrect asLong 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 DataType method to get the value's type of SQLValueRead object.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asShort as Int16
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as short.
Notes:
If the value of current object is NULL, asShort method returns 0. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is short, asShort method returns the original value with no conversion.

If the value's type of current object is bool (kDataTypeBool), long (kDataTypeLong), unsigned long (SkDataTypeULong), double (kDataTypeDouble) or numeric (kDataTypeNumeric), asShort method converts it to short data type. Note, that in this case the returned value can be truncated.

If the value's type of current object is string (kDataTypeString), asShort method tries to convert it to short value. If the conversion is possible and correct, asShort returns the value. If conversion is incorrect asShort 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 DataType method to get the value's type of SAValueRead object.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asStringValue as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value string.
Notes:
Same as asString but returns a REALbasic string.
Please use SQLStringMBS and CopyBinaryData if the string you want to read is a BLOB value, else text encoding will change your data!
For numbers, this may give english decimal separator. For getting localized one, please use AsDoubleValue and use cstr() function.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asText as Text
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 15.2 Yes Yes Yes Yes No
Function: Returns the value as text.
Notes:
Only intended for text, not for blobs.
Available on Xojo 2015 and newer.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asULong as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as an unsigned 32 bit integer value.
Notes:
If the value of current object is NULL, asULong method returns 0. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is long ( kDataTypeLong), asULong method returns the original value with no conversion.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), double (kDataTypeDouble) or numeric (kDataTypeNumeric), asULong method converts it to long data type. Note, that in this case the returned value can be truncated.

If the value's type of current object is string (kDataTypeString), asULong method tries to convert it to long ( kDataTypeLong) value. If the conversion is possible and correct, asULong returns kDataTypeLong value. If conversion is incorrect asULong 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 DataType method to get the value's type of SQLValueRead object.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asUShort as UInt16
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as unsigned short.
Notes:
If the value of current object is NULL, asUShort method returns 0. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is unsigned short, asUShort method returns the original value with no conversion.

If the value's type of current object is bool (kDataTypeBool), long (kDataTypeLong), unsigned long (SkDataTypeULong), double (kDataTypeDouble) or numeric (kDataTypeNumeric), asUShort method converts it to unsigned short data type. Note, that in this case the returned value can be truncated.

If the value's type of current object is string (kDataTypeString), asUShort method tries to convert it to unsigned short value. If the conversion is possible and correct, asUShort returns the value. If conversion is incorrect asUShort 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 DataType method to get the value's type of SAValueRead object.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.asVariant as Variant
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 12.5 Yes Yes Yes Yes No
Function: Returns the value as a variant.
Notes:
This is a convenience function.
May return nil, date, number or string.
BLOB strings without encoding and text strings as UTF-8.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.DataType as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns SAValueRead object's data type.
Notes:
One of the kDataType constants.
(Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.isNull as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns true if the value of current object is NULL; otherwise false.
Notes: (Read only property)

Feedback, Comments & Corrections

SQLValueReadMBS.LongOrLobReaderMode as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: The Long or Lob data reading mode.
Notes:
SQLAPI++ Library provides two ways to read Long or BLob(CLob) object's value (usually SQLField or SQLParam objects):

1. reading of Long or Lob data at once into an internal buffer (like ordinary string or binary values);
2. piecewise reading of Long or Lob data using user defined callback.
kLongOrLobReaderDefault reading mode used by default.

If you want to control piecewise reading of Long or BLob(CLob) data you should set LongOrLobReaderMode and use kLongOrLobReaderManual reading mode for Long or BLob(CLob) parameters or fields you want to process with your data consumer. After that each fetch will skip reading Long and BLob(CLob) parameters that you set to be read manually. To read field or parameter defined to be read manually you should call ReadLongOrLob method for each of them after the fetch. ReadLongOrLob method will repeatedly call the data consumer Write event.
(Read and Write property)

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS SQL Plugin.




Links
MBS Xojo tutorial videos