Announcement

Collapse
No announcement yet.

Control sc_exec_sql

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Control sc_exec_sql

    Hellooo

    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

  • #2
    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.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      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()

      Comment


      • #4
        Ok. Well it was a try. Tnx for the info.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment

        Working...
        X