Platforms to show: All Mac Windows Linux Cross-Platform

Back to SQLFieldMBS class.

SQLFieldMBS.Option(name as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The string value of a specific field option.

See for more details:
https://www.sqlapi.com/ApiDoc/class_s_a_field.html
(Read and Write computed property)

SQLFieldMBS.ReadLongOrLob(toConsumer as SQLDataConsumerMBS, BlockSize as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Starts reading of Long or BLob(CLob) value using the given data consumer.

BlockSize: Size of piece of data you want to get to the consumer event.

After a command execution all output parameters are updated by their values, including Long and BLob(CLob) parameters. If you want to control piecewise reading of Long or BLob(CLob) data you should do the following:

Before a command execution set kLongOrLobReaderManual reading mode (see LongOrLobReaderMode) for Long or BLob(CLob) parameters you want to process by a data consumer. After that SQLAPI++ will skip reading output Long and BLob(CLob) parameters that you set to be read manually.
After command execution use ReadLongOrLob method for each output parameter defined to be read manually.
Note, that if the command has result set(s) (it is possible in some servers, see Server specific notes) then output parameters are available only after all result sets are completely processed using FetchNext method.

See also:

SQLFieldMBS.ReadLongOrLob(toFile as FolderItem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Starts reading of Long or BLob(CLob) value to the given file.
Example
dim cmd as SQLCommandMBS // your command
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim field as SQLFieldMBS = cmd.Field("image")
// read blob content to binarystream
field.ReadLongOrLob(f)

May raise IOExceptions if things go wrong.

See also:

SQLFieldMBS.ReadLongOrLob(toStream as Writeable)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Starts reading of Long or BLob(CLob) value to the given writeable stream.
Example
dim cmd as SQLCommandMBS // your command
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim b as BinaryStream = BinaryStream.Create(f, true)
dim field as SQLFieldMBS = cmd.Field("image")
// read blob content to binarystream
field.ReadLongOrLob(b)

This allows you to read in chunks the data to a stream, e.g. binarystream, textoutputstream or socket.

See also:

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


The biggest plugin in space...