Description
Loads a file into a blob field in the SAP Business One database.
Syntax
Parameters
Example
| Loading a file into a blob field (C#) | Copy Code |
|---|
string blobFile = @"C:\0.gif.zip"; SAPbobsCOM.CompanyService oCompanyService = MainModule.oCompany.GetCompanyService(); // Specify the table and field to which to load the blob field BlobParams oBlobParams = (BlobParams)oCompanyService.GetDataInterface(SAPbobsCOM.CompanyServiceDataInterfaces.csdiBlobParams); oBlobParams.Table = "RDOC"; oBlobParams.Field = "Template"; // Specify the file to load into the DB string blobNewFilePath = @"C:\myblobfile1.zip"; oBlobParams.FileName = blobNewFilePath; // Specify the key field and key of the record whose blob field Is to be set BlobTableKeySegment oKeySegment = oBlobParams.BlobTableKeySegments.Add(); oKeySegment.Name = "DocCode"; oKeySegment.Value = "ACT10001"; // Load file into DB field oCompanyService.LoadBlobFromFile(oBlobParams); |
|
See Also