Error Parameter 'UnpreparedExecute' in postgres 9.1

Error Parameter 'UnpreparedExecute' in postgres 9.1

Postby Claudio » Tue 13 Sep 2011 16:20

Delphi: 2010 - Devart 1.40.13 - Postgres 9.1

Use: Table - TSimpleDataSet;
CommandText - 'select * from test';

Code: Select all

procedure TForm30.FormCreate(Sender: TObject);
begin
with Connection do
  begin
   Params.Clear;
   Params.Add('HostName=localhost');
   Params.Add('DataBase=postgres');
   Params.Add('user_name=postgres');
   Params.Add('password=1234');
   Params.Add('EnableBCD=True');
   Params.Add('UnpreparedExecute=True');  <---------------- COMMENT 8.4 OK  / 9.1 ERROR
   Params.Add('UseQuoteChar=True');
   Params.Add('UseUnicode=True');
   Params.Add('DetectParamTypes=True');
   Params.Add('OIDAsLargeObject=True');
   Params.Add('TrimFixedChar=True');
   Connected := True;
  end;
Connection.ExecuteDirect('create table IF NOT EXISTS test (id serial not null primary key, field_text text,classe text,carregar boolean)');
Table.Open;
Memo1.Lines.Text := StringOfChar('x', 50000);
Write;
Table.Close;
Table.Open;
Read;
end;

procedure TForm30.Write;
var
BinStream: TMemoryStream;
StrStream: TStringStream;
begin
BinStream := TMemoryStream.Create;
try
  StrStream := TStringStream.Create;
  try
   BinStream.WriteComponent(Self);
   BinStream.Seek(0, soFromBeginning);
   ObjectBinaryToText(BinStream, StrStream);
   Table.Edit;
   Table.FieldByName('field_text').AsString := StrStream.DataString;
   Table.Post;
   Table.ApplyUpdates(-1);
  finally
   BinStream.Free;
  end;
finally
  StrStream.Free;
end;
end;

procedure TForm30.Read;
var
StrStream: TStringStream;
BinStream: TMemoryStream;
begin
StrStream := TStringStream.Create(Table.FieldByName('field_text').AsString);
try
  BinStream := TMemoryStream.Create;
  try
   ObjectTextToBinary(StrStream, BinStream);  <---- ERROR
   BinStream.Seek(0, soFromBeginning);
  finally
   BinStream.Free;
  end;
finally
  StrStream.Free;
end;
end;



Thank´s
Claudio
 
Posts: 25
Joined: Tue 17 Mar 2009 12:47

Postby AlexP » Wed 14 Sep 2011 12:07

Hello,

Thank you for the information.
We have reproduced the problem.
We will notify you as soon as we have any results.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35

Hi

Postby Claudio » Tue 06 Dec 2011 18:24

Anything New ?

I need this change.

Thank´s
Claudio
 
Posts: 25
Joined: Tue 17 Mar 2009 12:47

Postby AlexP » Wed 07 Dec 2011 11:12

Hello,

We are still working on this problem.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for PostgreSQL