R
R
Rostislav2016-04-25 22:32:29
Java
Rostislav, 2016-04-25 22:32:29

How to get rid of the "Database is locked" problem?

I'm using a wrapper class to work with a database in a normal JavaSE console application. The application is multi-threaded, which, as I think, is the problem when various threads climb into the database to write / read data. What is the optimal solution to this problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2016-04-25
@leahch

What's the base? Are we using the Connection pool?!

I
Iron Bug, 2016-04-25
@rare

Data Source=c:\mydb.db;Version=3;Pooling=True;Max Pool Size=100;
More examples here: https://www.connectionstrings.com/sqlite/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question