I am writing an app in which I use a TZQuery with a TZUpdateRecord.
The query is a dataset of a datasource which I connected to a dbGrid. Now here is my problem:
The TZQuery.SQL is
SELECT prices.*, concerts.title as ct, concerts.start_time as st from prices left join concerts on prices.concert_id = concerts.id
TZUpdateSQL.InsertSQL is
INSERT INTO prices(title,visible,price)
VALUES (:title,:visible,:price)
I created a button "Create new record". If I press it, a new empty record appears. My MySQL database however gives it already an integer in the id field, but I can not see it in my application.
When I use a TZTable i don't have that problem, so my question is: What code should I use to automatically have my dataset refreshed for my inserted record?
// EDIT //
Oh, it might be worth mentioning that I use Lazarus (FPC), and a nightly buid of Zeos from ca. a month ago.
Auto-refresh just inserted records
Moderators: gto, cipto_kh, EgonHugeist