Jump to content
Edson.pol

[FireDAC][Phys][SQLite]-326. Cannot perform the action, because the previous action is in progress.

Recommended Posts

Hi everyone!

 

I am using SQLite, and I don't know why, a cited error message appeared.

I've tried everything to unlock the database: I renamed the .db file, changed the folder file, turned off the notebook, etc.,
but I can't unlock the .db database.

 

The error occurs when trying to open the query a second time, for example:

 

1) first execution - OK

qry.active: = False;
qry.SQL.Clear;
qry.SQL.Add ('DELETE FROM TAB_USERS');
qry.ExecSQL;

 

2) second execution - ERROR
qry.active: = False;
qry.SQL.Clear;
qry.SQL.Add ('INSERT INTO TAB_USERS ... ... ...');
qry.ExecSQL;

 

The error is fired at the line "qry.SQL.Clear;"

 

I don't know what else to do ... Does anyone have any tips?

 

Thankful!

Share this post


Link to post

I personally never used FireDAC, and it shouldn't be an issue at all, but here we go. Maybe the driver waits for commiting the transaction? Also you can try not to clear, but simply say qry.SQL.Text := 'DROP TABLE USERS'. It will also trigger the change in the TStrings (which I guess the SQL property is) but it worths a try...

Share this post


Link to post
I managed to get around for now ...

I created a new folder and moved the project files there.

In FDConnection, I used "Revert from Defaults", and then "Options" Command Execution, "Mode", changed it to "amNomBlocking".

For now the error has stopped.

Thankful!

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×