Hi all,
I have a problem in which I've read a lot about but have not been able to come up with a sufficient solution for. I am not very experienced with PARADOX or ObjectPal so this has been a toughy. Any insight on this would be extremely appreciated.
Here is the problem:
I am performing a data conversion on a Paradox database to be imported into SQL Server 2000. I have not had any problems using SQL Server's DTS package for the most part but unfortunately, BLOB fields do not come over.
I have a table called "Image.DB" that has two blob fields. GraphicPhoto (of data type BLOB Graphic) and BinaryPhoto (of datatype BLOB Binary). The Graphic Photo column seems to have nothing stored in it (When I go to BLOB options and check off Complete Display - nothing appears). I have written the following ObjectPal code to extract binary from the BinaryPhoto field into a a picture format (such as .jpg, .gif, .bmp, etc.):
Code:
var
tc tcursor
bn binary
cnt number
endvar
cnt = 0
tc.open(":SIDTables:Image.db") ; Open the source DB table
scan tc :
cnt = cnt + 1
bn=tc."BinaryPhoto" ; field containing graphic
bn.writetofile(":ExtractedImages:" + String(cnt) + "img.bmp") ; write to this
; directory as a .bmp file.
endscan
tc.close()
This is in fact extracting "something". But I can't figure out what format to put it in - in order to show the actual image.
As I stated before I am not experienced with ObjectPal or PARADOX so I might be missing some important features that I can be using.
Thank you in advance!
Chris