A support library to simplify handling of SQLite use in programs

Started by Michele, October 11, 2026, 04:37:50 PM

Previous topic - Next topic

Michele

I'm writing a library, named 'DynSQLite', to simplify the use of SQLite in user programs.
The library carry a table browser that allows CRUD (Create, Read, Update and Delete) actions on each row, and to inspect blob fields as hex or image, even save, or load, a table, supported formats CSV, JSON, XML and SQL script.
The package include also a SQL editor/executor, that comes with syntax highlighter and auto-completion.
I wrote a demo program, SQLite-Browser, that is completely based on DynSQLite, the images attached shows some samples of use.
The software is almost completed in version Beta, I'll publish soon in the hope that could be useful to someone else.


Michele

I forget to say that the help of Gemini speeded up everything.
The program compiles with PellesC, Clang and MSVC.

Vortex

Hi Michele,

Thanks. We will wait for an attachment to test your library.
Code it... That's all...

Michele

Thanks Vortex, I'm completing the DLL version and fixing some minor bugs.
I forget to mention that the browser, a customized listview control, use a working thread to fill the list, this allows an efficient and fast handling of huge databases.

Robert

Hi Michele:

This may not be relevant to your current project but it is something to keep in mind going forward.

Quoted from SQLite Release 3.54.0 On 2026-10-09
at
https://sqlite.org/releaselog/3_54_0.html

Quote10: Drop support for WindowsXP and earlier Windows versions, including WindowsCE. SQLite for Windows now requires Windows Vista (circa 2007) or later.

Michele

Quote from: Robert on October 13, 2026, 04:36:20 AMHi Michele:

This may not be relevant to your current project but it is something to keep in mind going forward.

Quoted from SQLite Release 3.54.0 On 2026-10-09
at
https://sqlite.org/releaselog/3_54_0.html

Quote10: Drop support for WindowsXP and earlier Windows versions, including WindowsCE. SQLite for Windows now requires Windows Vista (circa 2007) or later.
Thanks Robert, the short answer: my software isn't compatible with windows older than win10.
To allow for such old systems I should have used more complex approaches to obtain the results I got, I don't mean that isn't possible to make it back compatible, but I concluded that it wasn't worth the extra effort and, main reason, would have slowed down everything.
Anyway, because I'll publish the whole source, anybody, in case of need, can refactor it to the appropriate OS, also Linux maybe.

Michele

Here we are, I publish the alpha version of library 'DynSQLite' and sample application 'DynSQLite Studio'.
There is still a lot of debug and fixing of code (actually has repetitions and over-coding) as is normal for the first release.
In the project workspace I left the binary if you want test them immediately, if you prefer yuo can remove them and recompile the workspace.
I added the sqlite dll, header and library, they come from the binary release that you can download from the SQLite site if you want. This is important because DynSQLite, to analyze the DB, need some functions that aren't present in the PellesC reduced version. If you compile and try to run the app inside the IDE, without the DLL in the exe folder, it will automatically link with the native PellesC SQLite DLL causing the program to fail (A message box will tell you that some entries in DLL are missing).

EDIT: Amended the project directories.
To test the program you can download big databases from the net, like the northwind.db (One is here) whic contains images blobs, and employee.db (A copy here) very large DB useful to check efficiency of the browser control.
Other database useful for trigger evaluation is sakila_master.db (a copy here).

It would be grateful if you give me your feedback on usefulness of this library and report of bugs and feature requests.
Even more appreciated code enhancements.
Waiting to hear from you.

Robert

Hi Michele:

Great beginnings.

I would prefer that the windows of Database Inspector, Browse Tables and SQL Query Workbench would be modeless so that, at any one moment, more than one of the windows can be open.

When I construct a query, I have to be able to see the tables and fields.

Thank you.

Michele

Quote from: Robert on Yesterday at 05:53:25 AMHi Michele:

Great beginnings.

I would prefer that the windows of Database Inspector, Browse Tables and SQL Query Workbench would be modeless so that, at any one moment, more than one of the windows can be open.

When I construct a query, I have to be able to see the tables and fields.

Thank you.
Thanks Robert.
If you compile with the symbol 'MSQL_MODELESS_UI' defined in preprocessor, the windows become modeless. Maybe there will be problems syncyng upon database context modifications, probable crashes. I'm working on it.
When you construct a query pressing <CTRL>+<SPACE> will open the database object selector (see picture). Select teh object you want insert and press enter or double click it to insert.

P.S. The window background, with its rather grand, high-flown tone, was an idea conceived by the AI that generated it. Personally, I view my own work in much more modest terms, but I'm too lazy to change it.