I am using Active4D with a database that uses triggers. In testing, I notice that if a trigger error occurs via a save record call in Active4D, the error message occurs on the server, which admittedy doesn't surprise me.

For example, this code doesn't do what I'd like it to.

<%
        If (Defined ($f_locsite_submit))
                create record ([LOCATION_SITE])
                [LOCATION_SITE]locsite_name:=$f_locsite_name
                [LOCATION_SITE]locsite_descript:=$f_locsite_descript
                save record ([LOCATION_SITE])
                if (error=0)
                  unload record ([LOCATION_SITE])
                else
                  writebr ("A trigger error occurred. "+error)
                end if
                
        end if
%>

How do others handle this so that the error can be communicated back to the browser in a meaningful way?

4D 6.7.4
Active 4D 3.0b13
ITK 2.6

Thanks,

Brad Perkins




Reply via email to