SQL Object
 
Syntax
 
SQL.StoreFileInField ADOField, strFileName[, UseCompression[, IgnoreFileStorage]]
 
Description
Translates binary data stored in a file to a SQL-BLOB (Binary Large OBject) field and stores it in ADOField.
 
Parameter
Description
ADOField
ADODB.Field object in which to store the binary data.
strFileName
Full path and file name of the file from which the data is read.
UseCompression
Optional. Default value False. If True, the binary data is stored compressed in the SQL-BLOB field.
IgnoreFileStorage
Optional. Default Value False. If True, a set Tradium File Storage System is overridden and the binary data is stored in the specified instead of archived in the TFSS.
 
See Also
Example
Sub Main()
 
    Dim rsRecord As ADODB.Recordset
    SQL.RunRecordset "SELECT Top 1 * FROM Images", rsRecord
 
    If Not rsRecord.EOF Then
        ' bewaar oorspronkelijke afbeelding
        SQL.RetrieveFileFromField rsRecord!Data, rsRecord!FileName
        SQL.DisplayStatus "Retrieved " & rsRecord!FileName
 
        DoEvents
        ' vervang door nieuwe afbeelding
        SQL.StorefileInField rsRecord!Data, "c:\myImage.jpg", True
        rsRecord!FileName = "c:\myImage.jpg"
        rsRecord.Update
    End If
 
    Set rsRecord = Nothing
 
End Sub