[EMAIL PROTECTED] wrote:
> "Jiri Hajek" <[EMAIL PROTECTED]> writes:
>
>   
>> 1. Occasionally after running Sqlite3_step() I get SQLITE_CANTOPEN ('Unable
>> to open the database file') error. I found out that it can be fixed by
>> running the query again, i.e. again calling Sqlite3_Prepare(). So this isn't
>> a big issue, but still I wonder why this error message is returned?
>> Shouldn't SQLITE_BUSY or SQLITE_LOCKED be returned instead?
>>
>> 2. More serious issue is that after I enable transaction usage (not used in
>> 1.) sometimes (again, it's random) after calling 'BEGIN TRANSACTION' I get
>> an error SQLITE_ERROR ('cannot start a transaction within a transaction').
>> Problem is that I definitely am not already in a transaction. The only
>> reason for this seems to be that there's >1 thread running, with only 1
>> thread running there's no problem.
>>     
>
> Do you have a separate database handle (provided by a unique call to
> sqlite3_open()) for each and every thread?  If not, the above sort of error
> can occur.  If you ensure that every thread opens the database itself and no
> thread ever modifies the schema, you should not see either of those problems.
>
> Cheers,
>
> Derrell
>
>   
I personally did do all this, this doesn't solve the issue. As I
mentioned earlier, I followed all the rules, the only solution to avoid
the issues he's getting was to handle read/write locking myself.

-- 
Bill King, Software Engineer
Trolltech, Brisbane Technology Park
26 Brandl St, Eight Mile Plains, 
QLD, Australia, 4113
Tel + 61 7 3219 9906 (x137)
Fax + 61 7 3219 9938
mobile: 0423 532 733

Reply via email to