ExportCurrentObjectPropertyAsBlob method

Applies To

IWSIDOCollection interface

Definition

Retrieves a binary large object (BLOB), such as a graphic image, from the currently active record of a collection and writes it to a file.

Syntax

object.ExportCurrentObjectPropertyAsBlob( string1, string2 )

  Part   Description
object Required. A reference to the current IDO collection object.
string1 Required. The name of a binary property in the collection.
string2 Required. The name of the file to which the BLOB is to be written.

This string must include a path. The path can be relative to the directory containing WinStudio.exe.

Remarks

The difference between this method and the ExportObjectPropertyAsBlob method is that this one references the currently active object, and ExportObjectPropertyAsBlob acts on an object in a specified (usually other) row.

This method does not create directories.

If the currently active object does not contain any BLOB data, then this method does nothing and does not automatically generate an error message.

Attention:  This method does not warn you before overwriting files. This means that, if you already have a file by the same name as that in string2, this method overwrites it without warning.

Example

Sub Main()
   Dim PropertyName As String
   Dim FileName As String
   PropertyName = "blob_column"
   FileName = "C:\Temp\appGraphics\earth.png"
   ThisForm.PrimaryIDOCollection.ImportCurrentObjectPropertyAsBlob(PropertyName, FileName)
   FileName = "C:\Temp\ExportBlob.png"
   ThisForm.PrimaryIDOCollection.ExportCurrentObjectPropertyAsBlob(PropertyName, FileName)
End Sub
Rubriques liées