Re: 4GL-sqlca
Posted in 1997
Dieter Winkler <dwinkler@pfeiffer.co.at> schrieb im Beitrag <63mv50$ndu$1@news.Austria.EU.net>... > How can I get the number of an isam error after an SQL-Error succeded. > I would like to save the number in an 4gl-program. > > > > define stati integer .. update ...... let stati = status if stati != 0 then call errprog( stati, sqlca.sqlerrd[ 2 ]) end if .. function errprog( p_stati, p_isam) define p_stati integer, p_isam integer, isamtxt char(100), statitxt char(100) let isamtxt = err_get( p_isam) let statitxt = err_get( p_stati ) display " isam error: ", p_isam, " ", isamtxt clipped display " status error:", p_stati, " ", statitxt clipped end function But be careful with the text that give the function err_get back, because there is an \\0 on the end of the string. You will have problems with using the variable isamtxt after. ( let xxx_txt = isamtxt ) Live long and prosper! Patric end function