Posted on 2004-08-24
I am struggling with a real easy concept. Any help please.
I am using a TTable component to insert a blob into an Oracle database. the insert works fine, but when I want to update the table, I get a unique constraint error as the table want to insert another record with the same unique key,. instead of updating the BLOB of the existing key. I am not sure how to perform the update.
Teh database table only consist of two columns, one for a primary key and one for the blob.
My code are as follows:
with dm.tblBLOB do
if blobexist = 'Y' then Insert else Update;
FieldByName('DOCUMENT').AsString := docid;