The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ReplaceBLOB


Unit:SDL_geodb
Class:TGeoDB
Declaration: [1] procedure ReplaceBLOB (DBEntry: longint; FileName: string; Date: TDateTime; StateFlag: longint; LatLow, LatHigh, LongLow, LongHigh, Altitude: single; ClassNumber: byte; UserTag: longint; MInfo: TMetaInfo);
[2] procedure ReplaceBLOB (DBEntry: longint; Name: string; Date: TDateTime; StateFlag: longint; LatLow, LatHigh, LongLow, LongHigh, Altitude: single; ClassNumber: byte; UserTag: longint; MInfo: TMetaInfo; PBLOBData: pointer; SizeOfBLOBData: integer);
[3] procedure ReplaceBLOB (DBEntry: longint; Name: string; Date: TDateTime; StateFlag: longint; LatLow, LatHigh, LongLow, LongHigh, Altitude: single; ClassNumber: byte; UserTag: longint; MInfo: TMetaInfo; Data: TMemoryStream);

The method ReplaceBLOB replaces the database entry DBEntry either by the contents of a file (version [1]), or by the contents of a data structure (version [2]), or by the contents of a stream (version [3]).

The parameter FileName contains the full path of the file which is to replace the BLOB in the database (version [1]). When using version [2] of ReplaceBLOB the database entry DbEntry is replaced by a BLOB which is referred to by PBLOBData. The parameter SizeOfBLOBData specifies the size of the data structure to be added. Finally, in version [3] the method ReplaceBLOB replaces the database entry DbEntry by the BLOB contained in the stream Data.

The data is stored in the database as a BLOB of the type gitBLOB. The parameter Date holds the date and time associated with the BLOB. The parameter StateFlag reflects the state of the database entry. The parameters LatLow ... LongHigh specify the geographical area the BLOB is associated with. The parameter Altitude defines the (average) altitude of the BLOB data. ClassNumber contains the number of the class the new database entry should belong to, and the UserTag parameter may hold a user-defined number. UserTag is not used by the database system, it can be used to store additional information. The parameter MInfo contains the meta information of the BLOB.

Hint: The sub-property FilePath of the meta information is filled in automatically, all other meta information variables have to be set by the user before calling ReplaceBLOB.



Last Update: 2023-Dec-13