Platforms to show: All Mac Windows Linux Cross-Platform

Back to SQLParamMBS class.

SQLParamMBS.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 parameter option.

see also:
https://www.sqlapi.com/ApiDoc/class_s_a_param.html
(Read and Write computed property)

SQLParamMBS.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
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.

See also:

SQLParamMBS.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 Param as SQLParamMBS = cmd.Param("image")
// read blob content to binarystream
Param.ReadLongOrLob(f)

May raise IOExceptions if things go wrong.

See also:

SQLParamMBS.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 param as SQLParamMBS = cmd.param("image")
// read blob content to binarystream
param.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...