Platforms to show: All Mac Windows Linux Cross-Platform

Back to SQLValueReadMBS class.

SQLValueReadMBS.asBool as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value of current object as bool data.

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)

SQLValueReadMBS.asDouble as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
returns the value as Double data.

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)

SQLValueReadMBS.asInt32 as Int32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as Int32 data.

(Read only property)

SQLValueReadMBS.asInt64 as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as Int64 data.

(Read only property)

SQLValueReadMBS.asInteger as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as Integer data.

Either Int32 or Int64 depending on whether the application is 32 or 64 bit.
(Read only property)

SQLValueReadMBS.asLong as Int32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as Int32 data.

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)

SQLValueReadMBS.asShort as Int16

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as short.

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)

SQLValueReadMBS.asStringValue as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value string.

Same as asString but returns a Xojo 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)

SQLValueReadMBS.asUInt32 as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 19.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as UInt32 data.

(Read only property)

SQLValueReadMBS.asULong as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as an unsigned 32 bit integer value.

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)

SQLValueReadMBS.asUShort as UInt16

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as unsigned short.

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)

SQLValueReadMBS.asVariant as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value as a variant.

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)

SQLValueReadMBS.DataType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns SAValueRead object's data type.

One of the kDataType constants.
(Read only property)

SQLValueReadMBS.isNull as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if the value of current object is NULL; otherwise false.

(Read only property)

SQLValueReadMBS.LongOrLobReaderMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The Long or Lob data reading mode.

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)

Some examples using this property:

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


The biggest plugin in space...