Important: Please read the Qt Code of Conduct -

[Solved]In mysql database

  • While inserting to the database through editor i am having some problems.

    I am doing the project for preparing Qbank.
    In that i am entering the questions through the editor. (for choose, fillups, match, short ques and long ques).
    Through the editor i am entering my questions.

    After entering the first question, i am clicking the new for entering next question.
    While clicking that new, the previously entered question will be temporarily stored in tmp.xml.
    After entering the second question, again i'm clicking new for entering the next question.
    While clicking that new, the second question what i've entered is stored in that tmp.xml file.
    Like wise we are entering more questions through editor.
    Finally when clicking done all the previously entered question is get stored in the main xml file (i.e if i am entering questions for Choose means the entered questions are stored in the Choose.xml file).
    After clicking done, by clicking new again the last entered question is stored in the tmp.xml file only.
    It is not entering into the main xml file and also to the database.

    After sometime if i run and enter questions for Choose itself, the last entered question was permanantly lost, and it is replaced by the newly entering question.

    The last entered question should also get entered to the main xml file and to the database.

    please help me to solve this.

  • Please gives us something we can work with. All we know is you are doing something with xml files and a database, and that it is not doing what you expect. You solve this by correcting the error in your code and/or logic, none of which we can see.

  • Shall i post the piece of code, where from the tmp file copies to the main xml file.
    I dont know where to change the logic.
    Will you please help me, by saying where to change the logic?.

  • I didn't change my logic.
    Without changing the logic my problem is solved.
    Its the mistake made by me.
    While entering the questions through editor, after entering the question and answer everytime i have to click the N button for entering new question.
    Also after entering the last question i've to click the new button, after that only i've to click the done button.
    But i forget to do that.
    Before clicking done button, i forget to click the new button.
    So the last entered question is not get entered to the main xml file and into the database.
    But now its entering to the main xml file and also into the database.
    After seeing ur post only i think of what i'm doing wrong.
    Thanks for your useful post :) .

Log in to reply