Serious bugs on SQLInsert
Posted: Mon 05 Dec 2016 18:32
It looks like that two serious bugs exist on SQLInsert. I am on MySQL:
FIRST BUG
SQL Text is
SECOND BUG
Looks like that SQLInsert is fully connected with the SQL query and you cannot insert a record to other table. Also you cannot insert in two tables. Unidac complains and cannot add record.
Solution for all bugs is to use separate UniQuery for insert statement, but my question is why to have 100 queries for select + 100 queries for insert? Why? Please fix these issues so we can use those features.
FIRST BUG
SQL Text is
SQL Insert Text is:SELECT account_group_items.description, account_groups.expire_status, account_groups.expire_date FROM account_groups
left join account_group_items on account_group_items.id_account_group_item = account_groups.id_account_group_item
where account_groups.id_account = :id_account
order by account_group_items.`order` asc
If you try to .Append and FieldByName('id_account') you will receive an error message that id_account not found:INSERT account_groups
(`id_account_group_item`, `id_account`, `expire_status`, `expire_date`)
VALUES
(:id_account_group_item, :id_account, :expire_status, :expire_date)
If we add the id_account on the original select:EDatabaseError: MemberSelectGroups: Field 'id_account' not found
It still complains and returns error that cannot modify the field (!) :SELECT account_groups.id_account, account_group_items.description, account_groups.expire_status, ...
So its impossible to insert record.EDatabaseError: Field 'id_account_group_item' cannot be modified
SECOND BUG
Looks like that SQLInsert is fully connected with the SQL query and you cannot insert a record to other table. Also you cannot insert in two tables. Unidac complains and cannot add record.
Solution for all bugs is to use separate UniQuery for insert statement, but my question is why to have 100 queries for select + 100 queries for insert? Why? Please fix these issues so we can use those features.