Code: Select all
procedure CopyImageFromFile(FileName: String; Field: String; TargetTable: TZTable);
with Form1 do
if TargetTable.Active then
b := TargetTable.GetBookmark;
BlobStream := TargetTable.CreateBlobStream(
FileStream := TFileStream.Create(FileName, fmOpenRead);
If I don't do the "BEGIN" I get an invalid OID. I watched the connection with PGAdmin and just doing a StartTransaction did not put the connection into a transaction state. Doing a BEGIN and COMMIT did the right thing. Without them, I get an invalid oid error.
After that last Edit, the TargetTable goes back into the dsInsert state.
Am I just doing this wrong?