In project Blob fields, change "Bytea" to "lo";
DLL Version: 1.10.0.7
Delphi 2010.
Parameters;
HostName=localhost
DataBase=test
DriverName=DevartPostgreSQL
User_Name=postgres
Password=
OIDAsLargeObject=True
DetectParamTypes =True
UseUnicode=True
Load Picture; OK
Apply Change;
ERROR: TDBXError column "picture" type "lo" but expression is type "Bytea"
Monitor:
INSERT INTO DbxPgsql_BLOB
(id, name, picture)
values
($1, $2, $3)
:1 (Int32,IN) = 1
:2 (WideString,IN) = "Picture test"
:3 (Blob,IN) =
I need work types "LO".
Type "lo" question
Project change Devart Demo BlobPics
Project original from DEVART in DEMOS.
\Program Files\Devart\Dbx\PostgreSQL\Demos\Win32\BlobPictures\BlobPics
Original Line in MAIN.PAS
procedure TfmMain.btCreateClick(Sender: TObject);
begin
SQLConnection.ExecuteDirect('CREATE TABLE DbxPgsql_BLOB (' + ' id INTEGER PRIMARY KEY,' + ' Name VARCHAR(50),' + ' Picture bytea' + ')');
end;
Change:
procedure TfmMain.btCreateClick(Sender: TObject);
begin
SQLConnection.ExecuteDirect('CREATE TABLE DbxPgsql_BLOB (' + ' id INTEGER PRIMARY KEY,' + ' Name VARCHAR(50),' + ' Picture oid
' + ')');
end;
Run Project
\Program Files\Devart\Dbx\PostgreSQL\Demos\Win32\BlobPictures\BlobPics
Original Line in MAIN.PAS
procedure TfmMain.btCreateClick(Sender: TObject);
begin
SQLConnection.ExecuteDirect('CREATE TABLE DbxPgsql_BLOB (' + ' id INTEGER PRIMARY KEY,' + ' Name VARCHAR(50),' + ' Picture bytea' + ')');
end;
Change:
procedure TfmMain.btCreateClick(Sender: TObject);
begin
SQLConnection.ExecuteDirect('CREATE TABLE DbxPgsql_BLOB (' + ' id INTEGER PRIMARY KEY,' + ' Name VARCHAR(50),' + ' Picture oid
' + ')');
end;
Run Project