In SQL it is possible to define tables with a column, which is of type image. This field type is not known by Navision or by ADO and can thereby not be extracted like other fields.
There exists 2 ways to get this fields value.
1) One way is to stream the image to a file and then afterwards import it into the blob.
In this example I assume you already have the ADO Connection and thereby already got the ADORecordSet.
ADOStream.Type := 1; //1 = Binary
ADOStream.SaveToFile('c:\tmp.bmp',2); //2 = SaveCreateOverWrite
Where ADOStream is 'Microsoft ActiveX Data Objects 2.8 Library'.Stream
and ADORecordSet is 'Microsoft ActiveX Data Objects 2.8 Library'.Recordset
This method works for compressed and uncompressed Blob fields.
2) Another way is to move/insert the image into your table by using ADO RecordSet.
Create 2 connections, one to your image table (ADOConn) and one to the table in Navision (NAVconn) where you want the picture to be inserted. Then “transfer” the Value from one RecordSet to another and add it.
FromRecSet := ADOConn.Execute('SELECT image FROM tableX','',0);
//The following query is used to get a "blank" recordset, just like a INIT in Navision
MyQuery := 'SELECT [EntryNo], [Picture] FROM [MyTable] WHERE [EntryNo] = 0';
NewRecSet.Fields.Item('Picture').Value := FromRecSet.Fields.Item('image').Value;
This method does not work for compressed Blob fields!