All fields read only: TZQuery, TDataSet, TDBEdit

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Post Reply
tocibacsi
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 03.09.2013, 07:51

All fields read only: TZQuery, TDataSet, TDBEdit

Post by tocibacsi »

Hi All,

I'm new to ZeosLib. Some weeks ago I decided using PostgreSQL 'cause we had very bad support experience using Oracle XE versions. Zeos was the only freeware supporting our old project written in Delphi 7(...don't ask...) First of all, to preserve backward compatibility I have replaced NOCI with Zeos and I have configured it to use Oracle. It works well, nothing else had to be modified in my project. As next step, I have implemented SQLite support as many users aren't using client-server architectures - also having no problems at all... Just a few SQL script related cosmetics... Now I want to implement the PostgreSQL support but I get a lot of trouble.

Using Zeos v7.0.4 stable I was unable to edit my data fields. We are using the good old TQuery - TDataSource - TDBEdit (and TDB* components) structure. TZQuery.Edit and TZQuery.Append (Insert) aren't setting field's ReadOnly=False... or whatever. Fact is that I can not edit them. If I create a for cycle to set TZQuery.Fields.ReadOnly=False, then everything is OK. But this is not required for Oracle and SQLite, so I think #1. I make something wrong, or #2. there is a bug in Zeos.

I have then downloaded version 7.1 beta. Now it enables all fields (this predicts assumption #2), but when I try ZQuery.ApplyUpdates then it runs on error "Could not determine data type of parameter $2". I googled for this and I have found this: http://zeoslib.sourceforge.net/viewtopi ... =38&t=3817 (this confirms assumption #2.)

I have added ZEOS_TESTING_ONLY to Zeos.inc. Now it works, but I think that this is not the best solution to release my software for my customers. So what should I do? As I see, this is a known issue, but I am not an expert, I just want to use the known components and to focus to the main part of my job and not worrying about database issues... :)

Thanks for attention!

Kind Regards,
Ákos
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: All fields read only: TZQuery, TDataSet, TDBEdit

Post by marsupilami »

Hello tocibacsi,

I had a similar problem when I tried to use PostgreSQL. ZEOS currently is case sensitive when it comes to table names for PostgreSQL. PostgreSQL usually stores all table names in lower case in its system tables. The only exception is when you quote the table name when creating the table. So converting all table names to lower case solved the problem for me for now. I tried to resolve this issue bud did not succeed yet.
Best regards,

Jan
tocibacsi
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 03.09.2013, 07:51

Re: All fields read only: TZQuery, TDataSet, TDBEdit

Post by tocibacsi »

thanks Jan, I will try this!
Post Reply