I have been using "LoadFromFile" in my Delphi apps to load a pdf file into my 
Firebird databases.  However, I need to replicate this using an update query.
 

 The code below was my first attempt.  Using IBOjects within Delphi
 

   qryUpdateManifestBLOB.SQL.Clear;
   qryUpdateManifestBLOB.SQL.Add('UPDATE');
   qryUpdateManifestBLOB.SQL.Add('w_shipments');
   qryUpdateManifestBLOB.SQL.Add('SET');
   qryUpdateManifestBLOB.SQL.Add('w_shipments.US_manifest_doc =');
   qryUpdateManifestBLOB.SQL.Add('LoadFromFile');
   qryUpdateManifestBLOB.SQL.Add('(');
   qryUpdateManifestBLOB.SQL.Add(QuotedStr(fmWasteShipments.PathtoFile));
   qryUpdateManifestBLOB.SQL.Add(')');
   qryUpdateManifestBLOB.SQL.Add('WHERE');
   qryUpdateManifestBLOB.SQL.Add('w_shipments.shipments_pk = ');
   qryUpdateManifestBLOB.SQL.Add(ShipmentPK);
 

 The code produced this sql statement
 

    UPDATE  
    w_shipments
    SET 
    w_shipments.US_manifest_doc =
    LoadFromFile
    (
    'C:\Users\ccox.COXCOLVIN\Desktop\FedEx Form.pdf'
    )
    WHERE
    w_shipments.shipments_pk = 
    '585'
 

 which Firebird did not like because "LoadToFile" is an unknown function.
 

 Any help is greatly appreciated.  
 

 

 

Reply via email to