|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....|
|Home GeoPack GeoDB Methods AddBLOB|
|See also: AddRoad, AddLake, AddRiver, AddTown, AddBorder, AddCity, RetrieveBLOB, TMetaInfo, AddRoute, ReplaceBLOB, TgdbItem|
The method AddBLOB adds a BLOB to the database. AddBLOB is available in five versions which differ in the source of the binary data and the handling of file names. Versions , , and  load the data from a disk file, version  loads it from a data structure, and version  loads the data from a stream.
The parameter FileName contains the filename (including the full path specification) of the BLOB file (versions , , and ). Versions  and  allow to store the BLOB under a name (FNameInDB) different from the original filename. In versions  and  the original file spec is stored in the meta information of the BLOB, in version  the parameter OrgFilePath is stored as the original file path (despite the file has been loaded from a different path/name). Version  is especially useful if you have to store a file under different database name and a fake original filename.
Version  adds the data referred to by PBLOBData. The parameter SizeOfBLOBData specifies the size of the data structure to be added. Version  takes the data from the stream Data. The parameter Name (versions  and ) contains the name of the BLOB data. The data is stored as a BLOB using the database entry type gitBLOB.
The parameter Date holds the date and time associated with the BLOB. If Date is set to 0.0 the creation date of the file is stored in the database. 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 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.
The function AddBLOB returns the database entry number of the newly created entry, or a value of -1 if an error occurred.