Hello,
OID type - BUG ????
I use Delphi 2010 - Postgres 9.0 - driver 1.14.0.13
test:
Open your demo project BLOBPics.
Changing the type byte for OID. (procedure TfmMain.btCreateClick(Sender: TObject);
-------------------(as README)
OIDAsLargeObject
If True, fields with OID data type are treated as fields with large objects IDs. The driver will map such field on TBlobField, and read data from the corresponding large object automatically. If OIDAsLargeObject is set to False (default), OID data type is mapped on TIntegerField.
const
coOIDAsLargeObject = TSQLConnectionOption(501); //boolean
. . .
SQLConnection1.SQLConnection.SetOption(coOIDAsLargeObject, Integer(True));
Note 1: you should start a transaction before opening a query with large objects.
Note 2: if you need to edit TBlobField that corresponds a large object, set DetectParamTypes option to True. When you update TBlobField, the driver creates new large object and writes its OID to the field. An old large object that was referenced by this field becomes an orphan large object (an object that exist but is not referenced by any rows, wasting disk space). So do not update such fields, or create a trigger that unlinks old large object on update.
----------------------------------------------------------------
Add the SQLConnection property BEFORECONNECT
SQLConnection.Params.Values ['OIDAsLargeObject'] = 'True';
SQLConnection.Params.Values ['DetectParamTypes'] = 'True';
Change procedure TfmMain.btOpenClick
procedure TfmMain.btOpenClick(Sender: TObject);
var
Transacao: TDBXTransaction;
begin
Transacao := SQLConnection.BeginTransaction;
ClientDataSet.Open;
SQLConnection.RollbackFreeAndNil(Transacao);
end;
--------------------------------------------------------------------------
1) Run
2) Insert records (more than one) - works
3) ApplyUpdates - works
4) Refresh - will not work - Pictures are not show
Thank you.