Just something generic
procedure exportdata;
var x:longint;
begin
t1.open;
t1.first;
t1.Edit;
for x:=0 to filelist.count-1 do
begin
memo1.lines.add('exporting '+filelist[x]);
t1.insert;
t1.fieldByName('imageid').Text:=extractfilename(filelist[x]);
// somewhere here to populate field IMAGEBLOB with a
// blob that is in imagefile
end;
end;
Just a tstringlist of files to send. It creates the IMAGEID field..
but not sure how to get the BLOB? field which is called IMAGEBLOB to populate with data?
This is delphi 7 using ODAC 6.70.0.45
I can populate this table by hand in SQLDeveloper.. and I use a component called ImageEN to grab the images out of it, using the oratable and oradatasource just fine.
I just need to populate this table with 125k + files.
Export blob into database using Oratable?
You can use the following code to load BLOB to the field:
Code: Select all
t1.GetLob('IMAGEBLOB').LoadFromFile(extractfilename(filelist[x]));