Important: Please read the Qt Code of Conduct -

MySql Strange Problem :)

  • My Query gets successfully executed.
    But I dont see inserted record.
    When I insert records from mysql prompt than it shows that PRIMARY KEY which was set to AUTO_INCREMENT has been incremented. Thats means the query from Qt was success but the record does not show up.
    I have checked everything. I have passed all values in correct order.

  • Can you show query?
    and some code.

  • I have used transaction and did not committed it. When I did that it worked.
    But the thing is why mysql incremented the ID field when transaction is not committed.
    Is this Bug or something Can You Help qxoz :)

  • I think it's ok, because it reserve the "id" for a writing data after committing. If not reserve, after committing there can be written two records with identical id.

Log in to reply