Page 1 of 1
Problem when Post in 6.6.2-rc ... 6.6.5-stable
Posted: 13.08.2009, 22:39
by testebelo
I use TZQuery + TDataSetProvider + TClientDataSet + TZUpdateSql in Delphi 7. I test in MySql 3.23, 4.1 and 5.1 using protocol mysql-4.1 in TZConnection.
The 'real' table structure is: ' IdTab integer, SubIdTab integer, Field1 varchar(50), Field2 varchar(50)'.
The ZQuery.SQL = 'select IdTab, SubIdTab, left(Field1,20) as DescOperation, left(Field2,5) as DescUser from tabelas'
Because the 'real' structure and SQL are different, I adjust the assignment of the fields in ZUpdateSQL.ModifySql.
The insert operation works OK in all Zeos 6.x.
My problem is when I try to alter and post in 'Field1' or 'Field2': works OK only in 6.6.1-beta but in 6.6.2-rc ... 6.6.5-stable, ClientDataset.post produce EDBClient error "trying to modify a read-only field".
I know that this kind of SQL seems to be read-only but I use it in all my systems and it works in 6.6.1-beta
Posted: 25.08.2009, 21:29
by mdaems
Hi, do you have a very simple test project (+ data creation script) you could post into a bug report at
http://zeosbugs.firmos.at ?
Mark
Posted: 08.12.2009, 17:39
by haentschman
Hallo,
i have the same Problem. But it is only one Query. With other Queries and the same Properties it works.
the Query.ReadOnly is false and the State of the Query is dsEdit.
and here:
Code: Select all
procedure TZAbstractRODataset.SetFieldData(Field: TField; Buffer: Pointer);
var
ColumnIndex: Integer;
RowBuffer: PZRowBuffer;
WasNull: Boolean;
begin
WasNull := False;
if not Active then
raise EZDatabaseError.Create(SOperationIsNotAllowed4);
if not RequestLive and (Field.FieldKind = fkData) then
RaiseReadOnlyError;
// Check for readonly updates
// Lookup values are requeried automatically on edit of all fields.
// Didn't find a way to avoid this...
if Field.ReadOnly and (Field.FieldKind <> fkLookup)
and not (State in [dsSetKey, dsCalcFields, dsFilter, dsBlockRead, dsInternalCalc, dsOpening]) then
DatabaseErrorFmt(SFieldReadOnly, [Field.DisplayName]);
is Field.ReadOnly = True
I have updated from 6.6.2 to 6.6.5
Is there a solution ?
Thanks for help.
Edit: I switched back to 6.6.2 rc and now it works. But this is not the solution.
Posted: 03.03.2010, 22:21
by haentschman
Hi all...
is this Problem fixed in 6.6.6 ?
Posted: 04.03.2010, 07:48
by Wild_Pointer
testebelo,
I think what you need is to set Field1.ReadOnly := false; or do you want the fields to become writable once you attach ZUpdateSQL to the query?
haentschman,
you wrote, that Query.ReadOnly is false but did you check the ReadOnly property of the fields of your query? What is your query anyway? Do you use ZUpdateSQL ?
Posted: 05.04.2010, 15:11
by haentschman
Hi,
sorry for the late post
I used at this time a normal query. My Program works before i have updated the Components.
I have updated from 6.6.2 to 6.6.5
Nothing where changed in the Code. And i had the Problem like the first post. All Fields are (i think) not ReadOnly.
I switched back to 6.6.2 rc and now it works.
I always work with 6.6.2 ...
btw: great work
Posted: 06.04.2010, 09:35
by Wild_Pointer
Hello haentschman,
Can you provide the table create script and the SQL query you use in TZQuery?
Posted: 10.04.2010, 19:59
by haentschman
Hi,
that´s not easy... I dont know the Table and the SQL. The bugreport i have deleted
I try to make a Sample. I need some days...
have a nice day...