« Xojo 2016 Release 3 A… | Home | MBS Xojo / Real Studi… »

SQLite3 command line tool in Xojo

With next plugin version we allow you to run shell commands with SQLite3 within the plugin. This way you can easily script import/export things and use all the commands the SQLite3 command line tool offers.
dim arguments() as string dim f as FolderItem = SpecialFolder.Desktop.Child("test.sqlite") dim o as FolderItem = SpecialFolder.Desktop.Child("out.csv") arguments.Append "sqlite3" // path to app arguments.Append f.NativePath arguments.Append "-csv" arguments.Append "-header" arguments.Append "-cmd" arguments.Append ".output "+o.NativePath arguments.Append "-cmd" arguments.Append "select * from Documentation;" dim n as integer = InternalSQLiteLibraryMBS.Shell(arguments) Break
As our plugin supports encryption (SEE), JSON extension and full text indexing (FTS5), you can benefit from those, too. I think a few things can easily be automated in Xojo using this new interface. Please make sure you have the same database not open in your Xojo app the same time to avoid cache issues when writing to database. The biggest plugin in space...
14 09 16 - 14:37