Replies: 7 comments 1 reply
-
Hello @ZmicierGT, This is how SQLite works. You can't access your database file from several places at the same time. As a workaround, try reconnecting to the database instead of restarting the application. Please let me know if it helps. |
Beta Was this translation helpful? Give feedback.
-
Hi @ShadelessFox Thanks for the quick reply. If I add data to existing SQLite database from standalone script, it updates in DBeaver without problems. The problem is only when I delete the database (in the case of SQLite I mean to delete a .sqlite file) and create the same one - then refreshing does not work any more. I'm not sure if it is a bug or a feature, but It causes problems especially when developing DB structure establishment or integrity check functions in a standalone application (then DB is deleted/created quite often during development). I'll check if reconnecting helps and let you know then. |
Beta Was this translation helpful? Give feedback.
-
You can't delete the database file while there are live connections. You can do regular migrations by deleting existing data first and then importing new data. Please let me know if you have any questions left. |
Beta Was this translation helpful? Give feedback.
-
On POSIX-systems (including MacOS), it is possible to delete a file which is in use and I can delete a .sqlite file opened in DBeaver). However, the same time it fails on Windows (which is quite expected). When such opened .sqlite file is deleted (and even if it is created anew), then DBeaver won't see any changes in the database unless it is restarted or database is reconnected. Refreshing the database won't help. I believe in such case it is better if Refreshing would work ('see' that the file was deleted or created anew) or at least report an error (like initial database does not exist). Currently SQLite supports concurrency. Maybe DBeaver relies on the concept that a file in use can't be deleted (which is true on Windows only) and that SQLite does not support concurrency. |
Beta Was this translation helpful? Give feedback.
-
Could you try using Disconnect and then Reconnect command instead of Refresh? |
Beta Was this translation helpful? Give feedback.
-
Sure I can. However, the purpose of this issue is to report that currently some behavior of DBeaver may seem misleading. For example, definitely it is not expected by any user that Refresh or SELECT queries work or non-existent database finely without reporting any error and providing non-relevant data. If such behavior seems ok for you, just close this issue. |
Beta Was this translation helpful? Give feedback.
-
This is how the driver works. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi. I'm having some problems with refreshing SQLite database. To reflect the recent changes (made by python script), I need to restart DBeaver. Just refreshing from context menu or by pressing F5 does not work.
DBeaver Version
Community Edition 22.3.3
Operating System
macOS Monterrey 12.2.1
Database and driver
SQLite JDBC 3.40.1.0
Steps to reproduce
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions