5 Replies Latest reply on Jun 27, 2007 8:49 AM by JR "Bob" Dobbs-qSBHQ2

    cfif insert was successful?

    JohnGree Level 1
      Hi i have a sheduled task every 60 seconds which works like this

      1. finds email from my specified account
      2. gets info from the body of the email
      3. if email info matches info already in my database ie username password, then send SMS out.
      4. insert info into records table.
      5 delete email

      that is basicly the process.

      the issue i sometimes get is, if there is a problem with the insert query (very rairly but happens), then the email does not get deleted. so every 60 seconds the sms is sent out, again and again and again.


      so i was thinking can i do this.

      1. finds email from my specified account
      2. gets info from the body of the email
      3. if email info matches info already in my database ie username password, insert info into records table.

      4.if insert was successful then send sms and delete the email
      5. if the insert was NOT successful delete email anyway.


      but what would be the code to find out if the insert query was successful or not?


      Many thanks

      John