Page 1 of 1

ZQuery.Cancel error

Posted: 12.11.2020, 20:39
by nlanger
I encountered an error with ZQuery.Cancel. If there is one data record in the ZQuery and you do ZQuery.Insert is all OK, but if you do not do POST but CANCEL, the 1st sentence disappears and not the newly appended 2nd sentence. This only happens if there is exactly 1 record in it, if there are several records it works correctly.

I am using Zeos 7.3 beta and ZConn.Protocol = 'OleDB' on the MS-SQL Server 2014.

Re: ZQuery.Cancel error

Posted: 15.11.2020, 13:21
by EgonHugeist
Just let you know: Have no time to look to that bug. Guess ou are right. I will write a second post if i got it resolved..

Re: ZQuery.Cancel error

Posted: 16.11.2020, 20:07
by EgonHugeist
Hello Norbert
https://sourceforge.net/p/zeoslib/code-0/7086/ should fix it. Can you confirm it?

Re: ZQuery.Cancel error

Posted: 17.11.2020, 18:19
by nlanger
Yes that solves the problem - great.

I still have one effect, but it doesn't always happen. Have not yet found a reason under which conditions this occurs.

- Same access ZQuery via ZConn Protocol = 'OleDB' to MS-SQLserver 2014.
- With "select * from RGPOS where BNR=:0" = 4 data records are returned.
- Now you delete the penultimate data record = OK
- Now delete the last data record - error: "Bound variable index out of range: 7." (The number increases by two for every mistake.)

Always delete the last record = everything OK
After every ZQuery.Delete you also do ZQuery.Refresh = everything OK

Norbert

Re: ZQuery.Cancel error

Posted: 17.11.2020, 18:24
by nlanger
Addition: The table RGPOS has two fields in the primary key.

BNR varchar(9) not null *primary key
POS varchar(3) not null *primary key
ANR varchar(15) not null
BEZ varchar(100) null
INFO text null
LGNR varchar(2) null
ANZ numeric(8, 3) not null
...

Re: ZQuery.Cancel error

Posted: 18.11.2020, 08:13
by EgonHugeist
Hello Norbert,

please open a ticket for that:
make a create skript, a popullate data skript and a small no gui app (if possible) and i can fix it quickly. Yet my crystal ball doesn't talk to me :)