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.asBLob as SQLStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as BLob (SQLString) data.
Notes:
If the value of current object is NULL, asBLob method returns an empty string. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is string (kDataTypeString), bytes (kDataTypeBytes), long binary (kDataTypeLongBinary), long character (kDataTypeLongChar), BLob (kDataTypeBLob) or CLob (kDataTypeCLob), asBLob method returns the object's value as SQLString object.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), long (kDataTypeLong), double (kDataTypeDouble), numeric (kDataTypeNumeric), date-time (kDataTypeDateTime) or cursor (kDataTypeCursor), the result is undefined and debug version asserts.

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

Feedback, Comments & Corrections

SQLValueReadMBS.asBLobMemory as MemoryBlock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 16.4 Yes Yes Yes Yes No
Function: Returns the value as BLob data in a memoryblock.

Feedback, Comments & Corrections

SQLValueReadMBS.asBLobString as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 16.4 Yes Yes Yes Yes No
Function: Returns the value as BLob data in a string.

Feedback, Comments & Corrections

SQLValueReadMBS.asBytes as SQLStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as binary string data (SQLString).
Notes:
If the value of current object is NULL, asBytes method returns an empty string. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is string (kDataTypeString), bytes (kDataTypeBytes), long binary (kDataTypeLongBinary), long character (kDataTypeLongChar), BLob (kDataTypeBLob) or CLob (kDataTypeCLob), asBytes method returns the object's value as SQLString object.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), long (kDataTypeLong), double (kDataTypeDouble), numeric (kDataTypeNumeric) or date-time (kDataTypeDateTime), asBytes method returns a block of data with size sizeof(value's type) as SQLString object.

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

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

Feedback, Comments & Corrections

SQLValueReadMBS.asCLob as SQLStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as CLob (SQLString) data.
Notes:
If the value of current object is NULL, asCLob method returns an empty string. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is string (kDataTypeString), bytes (kDataTypeBytes), long binary (kDataTypeLongBinary), long character (kDataTypeLongChar), BLob (kDataTypeBLob) or CLob (kDataTypeCLob), asCLob method returns the object's value as SQLString object.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), long (kDataTypeLong), double (kDataTypeDouble), numeric(kDataTypeNumeric), date-time (kDataTypeDateTime) or cursor (kDataTypeCursor), the result is undefined and debug version asserts.

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

Feedback, Comments & Corrections

SQLValueReadMBS.asDate as Date
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 11.2 Yes Yes Yes Yes No
Function: Returns the value as date.
Example:
dim cmd as SQLCommandMBS // your command object
dim d as date = cmd.Field("mydate").asDate // read date value
Notes:
If the value of current object is NULL, asDate method returns an empty date object. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is kDataTypeDateTime, asDate method returns date object.

If the value's type of current object is any data type except kDataTypeDateTime, the result is undefined and debug version asserts.

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

Feedback, Comments & Corrections

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

If the value's type of current object is kDataTypeDateTime, asDateTime method returns SQLDateTime object.

If the value's type of current object is any data type except kDataTypeDateTime, the result is undefined and debug version asserts.

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

Feedback, Comments & Corrections

SQLValueReadMBS.asInterval as SQLIntervalMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as interval (SQLIntervalMBS).

Feedback, Comments & Corrections

SQLValueReadMBS.asLongBinary as SQLStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as long binary (SQLString) data.
Notes:
If the value of current object is NULL, asLongBinary method returns an empty string. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is string (kDataTypeString), bytes (kDataTypeBytes), long binary (kDataTypeLongBinary), long character (kDataTypeLongChar), BLob (kDataTypeBLob) or CLob (kDataTypeCLob), asLongBinary method returns the object's value as SQLString object.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), long (kDataTypeLong), double (kDataTypeDouble), numeric (kDataTypeNumeric), date-time (kDataTypeDateTime) or cursor (kDataTypeCursor), the result is undefined and debug version asserts.

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

Feedback, Comments & Corrections

SQLValueReadMBS.asLongChar as SQLStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as long character (SQLString) data.
Notes:
If the value of current object is NULL, asLongChar method returns an empty string. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is string (kDataTypeString), bytes (kDataTypeBytes), long binary (kDataTypeLongBinary), long character (kDataTypeLongChar), BLob (kDataTypeBLob) or CLob (kDataTypeCLob), asLongChar method returns the object's value as SQLString object.

If the value's type of current object is bool (kDataTypeBool), short (kDataTypeShort), long (kDataTypeLong), double (kDataTypeDouble), numeric (kDataTypeNumeric), date-time (kDataTypeDateTime) or cursor (kDataTypeCursor), the result is undefined and debug version asserts.

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

Feedback, Comments & Corrections

SQLValueReadMBS.asNumeric as SQLNumericMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Returns the value as SQLNumeric data.
Notes:
If the value of current object is NULL, asNumeric 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 exact numeric value (kDataTypeNumeric), asNumeric method returns the original value with no conversion.

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

If the value's type of current object is string (kDataTypeString), asNumeric method tries to convert it from SQLChar* value. If the conversion is possible and correct, asNumeric converts to SQLNumeric from SQLChar* 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 DataType method to get the value's type of SQLValueRead object.

Feedback, Comments & Corrections

SQLValueReadMBS.asString as SQLStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: returns the value as string (SQLString) data.
Notes:
If the value of current object is NULL, asString method returns an empty string. Use isNull method to make sure if the value is NULL or not.

If the value's type of current object is bool (kDataTypeBool), asString method returns "true" or "false" string (SQLString object).

If the value's type of current object is short (kDataTypeShort), asString method converts it to decimal string (SQLString object) like function printf("%hd", ...) does.

If the value's type of current object is long (kDataTypeLong), asString method converts it to decimal string (SQLString object) like function printf("%ld", ...) does.

If the value's type of current object is double (kDataTypeDouble), asString method converts it to decimal string (SQLString object) like function printf("%g", ...) does.

If the value's type of current object is numeric (kDataTypeNumeric), asString method converts it to decimal string (SQLString object) without precision loss.

If the value's type of current object is date-time (kDataTypeDateTime), asString method converts it to string (SQLString object) like function asctime(...) does.

If the value's type of current object is string (kDataTypeString, kDataTypeLongChar, kDataTypeCLob), asString method returns the original object's value as SQLString object.

If the value's type of current object is binary (kDataTypeBytes, kDataTypeLongBinary, kDataTypeBLob), asString method converts it to hexadecimal string ( SQLString object).

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

Use DataType method to get the value's type of SQLValueRead object.
For numbers, this may give english decimal separator. For getting localized one, please use AsDoubleValue and use cstr() function.

Feedback, Comments & Corrections

SQLValueReadMBS.Constructor(DataType as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Creates a new empty value object for the given data type.

See also:

Feedback, Comments & Corrections

SQLValueReadMBS.Constructor(value as SQLValueReadMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 9.3 Yes Yes Yes Yes No
Function: Creates a new value object by copying the given one.

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins