ErikEJ / SqlCeToolbox

SQLite & SQL Server Compact Toolbox extension for Visual Studio, SSMS (and stand alone)
Other
838 stars 175 forks source link

SQLite & SQL Server Compact Toolbox extension for Visual Studio 2022 - scripting SQlite database with FTS5 error #983

Open alexey-leonovich opened 2 months ago

alexey-leonovich commented 2 months ago

When I open SQLite database with FTS5, select Script Database -> Script Schema and click Script to Window - I get an error: image Toobox info: image Other tools (e. g. SQLite Expert Personal) script same database without any problem.

Steps to reproduce

  1. Open database in a toolbox - test.zip
  2. Select Script Database -> Script Schema
  3. Click Script to Window button

Further technical details

Toolbox/Power Tools version: SQLite & SQL Server Compact Toolbox extension 4.8.776

Database engine: SQLite

Visual Studio or SSMS version: Visual Studio 2022 17.9.6 Pro

ErikEJ commented 2 months ago

What is fts5 ?? Is it supported in Sqlite 3.40?

ErikEJ commented 2 months ago

I found this: https://sqlite.org/forum/info/4cf36abaf7011e76cbb73e07591d4a0cae6bcc9b7c2fe5e548f6fed02710e503

ErikEJ commented 2 months ago

@alexey-leonovich thoughts?

ErikEJ commented 2 months ago
                var dllFullFileName = Path.Combine(path, "SQLite.Interop.dll");
                connection.Open();
                connection.EnableExtensions(true);
                connection.LoadExtension(dllFullFileName, "sqlite3_fts5_init");
alexey-leonovich commented 1 month ago

I found this: https://sqlite.org/forum/info/4cf36abaf7011e76cbb73e07591d4a0cae6bcc9b7c2fe5e548f6fed02710e503

                var dllFullFileName = Path.Combine(path, "SQLite.Interop.dll");
                connection.Open();
                connection.EnableExtensions(true);
                connection.LoadExtension(dllFullFileName, "sqlite3_fts5_init");

@ErikEJ sorry, again I've missed all github notifications somehow :( That code is correct. I'm working with fts5 SQLite database same way. P. S. fts5 is a full-text search extension that was introduced in sqlite 3.9.0 (2015-10-14).

ErikEJ commented 1 month ago

@alexey-leonovich Thanks for conforming, I hope to get around to implementing this one day.