Error codes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ZoombyWoof

    #1

    Error codes

    Hi. I have a C-program that inserts data in a database,
    and sometimes there will be a duplicate. I have an index in the table so
    the INSERT will not succeed. How can I from my C-program be sure that the
    mysql_query call failed due to duplicate ? The function returns -1...is
    there a way to make sure that the call failed due to duplicate and not
    some other error ?

    Thanx

    /ZoombyWoof
Working...