Discussion in 'isxSQLite' started by Bumbulla, Jun 5, 2011.

  1. Bumbulla

    Bumbulla Active Member

    Messages:
    26
    Hey

    as shown in the sample script, im using the execdmltransaction method to put some datas in the db. So far so good, but once the script is finnished and im trying to start the script again, it'll tell me "cannot start a transaction within a transaction".
    Strange thing is, im using this method multiple times in my script, all other parts where im using it are running fine, but just this part will give out the error once i ran the script a 2nd time.

    Here's the part im using:

    Anyone got an idea what im doing wrong?
  2. pr517

    pr517 Active Member

    Messages:
    118
    It sounds like it isn't doing "END TRANSACTION" at the end of the transaction likely from either broken statements causing a break or interfering parallel transactions. So at the beginning of a new transaction it does another "BEGIN TRANSACTION" but it is still in that stage. Are you sure that the statements are legit (valid fields, acceptable values, etc.)? Is a previous transaction still being carried out?
  3. Amadeus

    Amadeus The Maestro Staff Member

    Messages:
    8,264
    Yes, try replacing all your variables with actual values and test it and see if that fixes it. You probably have a statement somewhere that is an issue.
  4. Bumbulla

    Bumbulla Active Member

    Messages:
    26
    Once the server is back up im going to test if all datas are valid. But as i said im using the same method only a few codelines later and it is working fine there. Dunno what might be wrong.
  5. Bumbulla

    Bumbulla Active Member

    Messages:
    26
    Checked it now - all datas are valid and even if i replace the vars with static values its still gonna give me the same error after the first script run.
  6. Amadeus

    Amadeus The Maestro Staff Member

    Messages:
    8,264
    I would have to see the entire script to have more help.

    You are closing the database once your script ends, right?
  7. Bumbulla

    Bumbulla Active Member

    Messages:
    26
    Yes db will be closed once script finished.
    Right now im even more clueless tho. If im running the script a 2nd time it'll say now that db is still locked but there is no other threat trying to access it. (And all i changed is that i took those 3 update statements into one query coz its the same table anyways.)
  8. Amadeus

    Amadeus The Maestro Staff Member

    Messages:
    8,264
    Again, I would have to see the script to know where the bug lies. The sample script I provide does what you're describing and does not have that bug.
  9. Bumbulla

    Bumbulla Active Member

    Messages:
    26
    Hey its me again. :)

    Havnt had any time last weeks. Trying to give a clear update on the situation:

    I tested exactly the same script with just a few (4) database entrys on another character. 1st run went fine so i tried to run it a 2nd time. Console told me that i cant run the script again coz its still/again running. Whatever that caused, for now i simply avoided it with manually ending the script (ends scriptname). Now i ran the script a 2nd and 3rd time without problems at all. *happy*
    So i went back on my main botting char and tested the same with my "original" database with like 500 entrys. First run went thru without any problems. Tried to start the script again - same error as above, script still running. Same procedure as above and finally started the 2nd run. 3 Querys were done fine - 4th query caused a client freeze of 2minutes and ended in an error msg "[sqlite] <ERROR> (5) SQLiteDB.ExecDMLTransaction:: Error ending SQLite Transaction. (Error: 5:SQLITE_BUSY[5]: database is locked)".
    I aborted the running script and asking what that might have caused. As it seems (first run) the script is working as intended. (?)

    Im more a hobby coder tho and my script might simply look horrible for you guys - but if you wanna see it, tell me. (Aslong as you dont rape me. :) )

    //Update

    Tested a reduced database down to just 1 entry on my main botting char - after the first run the same error (db locked). Went back on one of my alts and tested the db there - no problems. How can it be char located? Im confused.
    Last edited: Sep 16, 2011

Share This Page