It's possible get sql error code using TDBC ?

Liste des GroupesRevenir à cl tcl 
Sujet : It's possible get sql error code using TDBC ?
De : aleccp (at) *nospam* yahoo.com (Luis Alejandro Muzzachiodi)
Groupes : comp.lang.tcl
Date : 28. Mar 2025, 03:02:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vs502b$1jv1q$1@dont-email.me>
User-Agent : Mozilla Thunderbird
Hello,
I am using the TDBC mysql driver. Maybe I'm not getting it but I can't find how to retrieve the sql error message that a transaction returns. That is, if I capture (for example, with catch) the error shows me all a lot of data that, for practical purposes, it is too much information and in English, of curse. Can the SQL code from the error be recovered?. In this way, it could show a simpler message and in Spanish.
Example:
instead of show this ...
Cannot delete or update a parent row: a foreign key constraint fails (`xxxx_DB01`.`xxx`, CONSTRAINT `RI_xxid` FOREIGN KEY (`xxid`) REFERENCES `xx_xxx` (`xxid`) ON UPDATE CASCADE)
because i received the error number 1451, i would show :
"No se puede borrar este blabla porque tiene bleble asociados"
Thanks,
Alejandro

Date Sujet#  Auteur
28 Mar 25 * It's possible get sql error code using TDBC ?5Luis Alejandro Muzzachiodi
28 Mar 25 `* Re: It's possible get sql error code using TDBC ?4Harald Oehlmann
29 Mar 25  `* Re: It's possible get sql error code using TDBC ?3Luis Alejandro Muzzachiodi
29 Mar 25   `* Re: It's possible get sql error code using TDBC ?2Harald Oehlmann
30 Mar 25    `- Re: It's possible get sql error code using TDBC ?1Luis Alejandro Muzzachiodi

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal