Platforms to show: All Mac Windows Linux Cross-Platform

Back to SQLValueMBS class.

Previous items

SQLValueMBS.setAsUShort(value as UInt16)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets parameter's value as unsigned short data.

Sets value as unsigned short data.

SQLValueMBS.setAsValueRead(value as SQLValueReadMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets parameter's value from SQLParam or SQLField objects.

This method allows using SQLField or SQLParam object received from one SQL statement as a parameter for another SQL statement.

SQLValueMBS.setVariant(value as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the value based on a variant.
Example
dim con as SQLConnectionMBS // your connection
dim pic as picture // some picture

// get picture data
dim jpegData as MemoryBlock = pic.GetData(Picture.FormatJPEG, 80)

// get a command for an Insert command
dim sql as string = "Insert into BlobTest(name, image) values (:name, :image)"
dim cmd as new SQLCommandMBS(con, sql)

// set values by variant
cmd.Param("name").setVariant "logo.jpg"
cmd.Param("image").setVariant jpegData

// do the insert
cmd.Execute

MemoryBlock and Strings without text encoding are converted to byte values (BLOB).
Texts and Strings with encoding are converted to text values.
Raises exceptions if you pass anything which is not recognized.
Other types are translated as good as possible.

With version 19.0 or later, you can pass folderitem to stream blob from file. This may raise exception if file can't be opened.

Previous items

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


The biggest plugin in space...