Read-only dataset

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Read-only dataset

Post by mariusz » Thu 02 Jan 2014 14:17

Hi there...

I have database "PostgreSQL 9.1.1, compiled by Visual C++ build 1500, 64-bit" with some tables. I have also couple of my applications compiled with PgDAC 4.0.2 and PgDAC 4.2.5 (delphi XE2 and XE5). Everything runs on Windows 2008 R2 64 bits (sp1).

I have a problem, because with this database, my applications (production one and specially created test one) can not edit data, because of read-only dataset. I tested database with SQL Manager and PG Admin (with same username) and I can edit data with no problems. Only with my applications I can not.

The same applications, with other servers can edit data and works properly.

I thought that maybe problem is with my server, but I can not find anything that locks dataset's or restrict eg. application name.

Of course, TPgQuery is not read-only and I have key fields property set. AutoEdit property of TDataSource is true. My grid and /or TDBEdit are not read-only neither. I can remove datasource and edit controls and try to edit data from the code:
query.edit;
query.fieldbyname('my_column').AsString := 'test';
query.post;

Same effect.

If I use sql and execsql - it edit's data.

Can you point me - what could be wrong?

regards
Mario

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Read-only dataset

Post by AlexP » Fri 03 Jan 2014 14:49

Hello,

Please specify the exact error message that you get when trying to edit data, and make sure that the ReadOnly property of the DataSet is set to False before editing data.

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Re: Read-only dataset

Post by mariusz » Fri 03 Jan 2014 15:05

Code: Select all

  except
    on E : Exception do
    begin
      mem_1.Lines.Add(E.ClassName+' error raised, with message : '+E.Message+' at: '+datetimetostr(now));
    end;
  end;
gives to me message: EDatabaseError error raised, with message : pg_q_1: Cannot modify a read-only dataset at:.....

And I'm sure, that my DataSet IS NOT readOnly. Also, please notice, that (as I wrote) the same two applications can easily edit data on any other postgres server.

If you want, we can arrange TeavViewer session for you.

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Re: Read-only dataset

Post by mariusz » Fri 03 Jan 2014 15:18

I'll send to your e-mail address test project which also can not edit data on that server.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Read-only dataset

Post by AlexP » Fri 10 Jan 2014 09:59

Hello,

We cannot reproduce the problem on our servers. If you can give us access to your server, we will try to reproduce the problem directly on your server. Unfortunately, we cannot resolve the issue an issue without reproducing it.

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Re: Read-only dataset

Post by mariusz » Fri 10 Jan 2014 10:10

Yeah... I thought that it will easier... I can not give you access to that machine, because this is financial institutuion with complicated security rules. Is this enough for you to try to reproduce problem trough teamviewer from my machine? Of yes, i can arange session for you.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Read-only dataset

Post by AlexP » Sat 11 Jan 2014 13:08

Hello,

If you have PgDAC edition without source code, the teamviewer session won't solve your problem. If you have PgDAC sources, please send us the connection parameters, and convenient time for the teamviewer session.

Post Reply