Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By marcosfpa
How to know if executeQuery gave error?

For example: I need to put a control where when a executeQuery ($ sql, $ db) can not connect to the database I can somehow store a warning in a variable. How to make?
You can create another trigger with this code:
Code: Select all
@@errorMessage = @@__ERROR__;
Set this trigger to fire after your other trigger which executes executeQuery().

If you want to display this in a Dynaform, then create a text field in Dynaform associated with the "errorMessage" variable.
I don't have time to test this, but try this:
Code: Select all
if (!empty(@@__ERROR__)) {
   throw new Exception(@@__ERROR__);
If that doesn't work, then try this:
Code: Select all
if (!empty(@@__ERROR__)) {
   $g = new G();
   $g->SendMessageText(@@__ERROR__, "ERROR");
If neither work, then the only solution is to display the error in a later Dynaform.
Enabling SQL Server in Windows

360DigiTMG Provides the Data Science Course with[…]

Hi team, Just came across this post and I am actu[…]

hola voy directo al problema Quiero generar un lin[…]

REST Light endpoints

Hi, I am using POST start-case API to create a […]