Hi, I try to understand how it work. Sometimes my primary key, autoinc doesn't show me the value after an insert in my TMyQuery component.
I do an "append" and "post" on my TMyQuery with the query:
Code: Select all
SELECT article_compo.*
, (SELECT CONCAT(IFNULL(article_soumission.nom_article, ""), ' ', article_soumission.descrip) FROM article_soumission
   WHERE article_soumission.idarticle_soumission = article_compo.idarticle_soumission_compo) AS concat_article
FROM article_compo
ORDER BY concat_articleon 2 differents networks (differents servers) after my "post" i have acces to the value of the primary key autoinc.
on another network the value is NULL from the TMYQuery Componenent but with the workbench I have access to the real value.
if I change my query for:
Code: Select all
SELECT article_compo.*
, (SELECT CONCAT(IFNULL(article_soumission.nom_article, ""), ' ', article_soumission.descrip) FROM article_soumission
   WHERE article_soumission.idarticle_soumission = article_compo.idarticle_soumission_compo) AS concat_article
FROM article_compoWhere the problem come from ?
I got a lot of problem of that kind (insert, update, refresh) with query with left join or more than one select. Do you have some advice about it. I know about (updates SQLs "statement type") but i prefer to make my query work without if possible.
Thanks