Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.
public SalBoolean DbBlobWriteFromFile(SalSqlHandle hSql, SalString sMethodName, SalString sObjid, ref SalString sObjversion, SalString sFileName, ref SalNumber nFileErrorCode)
The DbBlobWriteFromFile method writes (streams) a BLOB from a file to the database using a PL/SQL procedure.
Name | Description |
---|---|
Sql Handle: hSql | Handle that identifies the database connection |
String: sMethodName | PLSQL method that updates the BLOB. |
String: sObjid | OBJID to the record the BLOB should be written to |
Receive String: sObjversion | OBJVERSION to the record the BLOB should be written to. Normally, the PLSQL method uses this to lock the record for update and returns the new objversion if the update succeeded. |
String: sFileName | The file name the BLOB should be written from. |
Receive Number: nFileErrorCode | If an error was caused by the file I/O operation, the
value is a VTERR_* error code. If the operation completed successfully, the value is VTERR_Ok. |
TRUE if the operation succeeded, FALSE otherwise.
The PL/SQL method must have a certain list of arguments in order to work with the DbBlobWriteFromFile method. Details and examples can be found in the Large Objects section in Development Guide for IFS/Base Server.
sObjversion = DataRecordVersionGet( ) bOK = DbBlobWriteFromFile( c_hSql, 'LOB_API.Write_Picture__', DataRecordIdGet( ), sObjversion , sFileName, nFileErrorCode )