ZQuery ZUpdateSql

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
k1attila1
Junior Boarder
Junior Boarder
Posts: 29
Joined: 24.05.2013, 06:38

ZQuery ZUpdateSql

Post by k1attila1 »

Hi

I have a problem but i can't solve it alone.

I use firebird with Zquery and ZUpdateSQL.

Everything works fine, but how can i get an errormessage if updatesql, deletesql statement can't executed, because somebody else deleted or modified the record.
Because i can't get errormessage and i can't read the affected rows number. ( = 0 )


thanks Attila
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: ZQuery ZUpdateSql

Post by EgonHugeist »

Attila,

to be clear:
You want to have a ErrorMessage from FB if a reord was missing. Aren't you working with transactions?

So if i understand you correctly the TZUpdateSQL component does not raise an exception which bropably was raised by FB?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
k1attila1
Junior Boarder
Junior Boarder
Posts: 29
Joined: 24.05.2013, 06:38

Re: ZQuery ZUpdateSql

Post by k1attila1 »

Yes

ZQuery and ZTable work very well

But if i use ZQuery with ZUpdateSQL i can't get any message, errorcode, '0 rows updated' etc.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: ZQuery ZUpdateSql

Post by EgonHugeist »

Ok than you're expecting zeos is missing validating the update count.

Not a problem, i'll check this!
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
k1attila1
Junior Boarder
Junior Boarder
Posts: 29
Joined: 24.05.2013, 06:38

Re: ZQuery ZUpdateSql

Post by k1attila1 »

Sorry i have forgotten

I think FB doesn't raise exception when we can't update or delete a record (which were deleted or modified before by another user), i think only

send a '0 rows affected message'
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: ZQuery ZUpdateSql

Post by EgonHugeist »

Attila,

missing ValidateUpdateCount added.
Patch done R3493 \testing-7.2 (SVN)

Thanks for the hint!

Note you can improve same by adding 'ValidateUpdateCount=True' to the TZDataSet-Component.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
k1attila1
Junior Boarder
Junior Boarder
Posts: 29
Joined: 24.05.2013, 06:38

Re: ZQuery ZUpdateSql

Post by k1attila1 »

Thank you very much for the fast action.

Attila
alexs75
Junior Boarder
Junior Boarder
Posts: 28
Joined: 04.03.2014, 12:37

Re: ZQuery ZUpdateSql

Post by alexs75 »

Is it possible to disable this check, if Zquery.CashedUpdate = true?
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: ZQuery ZUpdateSql

Post by EgonHugeist »

@Alex
Note you can improve same by adding 'ValidateUpdateCount=True' to the TZDataSet-Component.
You can also disable this by setting the value to False.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
alexs75
Junior Boarder
Junior Boarder
Posts: 28
Joined: 04.03.2014, 12:37

Re: ZQuery ZUpdateSql

Post by alexs75 »

In the CachedUpdate = true, this test should only work when calling ApplyUpdate. Now it works after calling Post.
Post Reply