Control sc_exec_sql

Hellooo :wink:

How would you do to control the result of the ‘sc_exec_sql’ function ?

I am working with this in a blank application in order to import a csv file.
When the query is correctly made the result is right : the table is correctly updated or the news rows added.
But i would like to inform the user when the query is correctly executed and when there is a problem catch it and display it.

For example with foreign keys.

Thanks :smiley:

I’m not sure. To find out I would embed this routine in a try… catch and apply a errournous sql to see what’s happening.

Thanks for your advice aducom.
But I tried try… catch (Exception)
or try… catch (ErrorException)

Nothing succeed when the sql query is not good.

Forced to use mysql_query and mysql_error()

Ok. Well it was a try. Tnx for the info.