JSON1 support for SQLite
Posted: Thu 28 Dec 2017 08:01
I see from a prior post that the JSON1 SQLite loadable extension has been included/enabled for the dotConnect product. Can this also be done for UniDAC? Thanks.
Discussion forums for open issues and questions concerning database tools, data access components and developer tools from Devart
https://forums.devart.com/
Code: Select all
...
UniConnection.ProviderName := 'SQLite';
UniConnection.SpecificOptions.Values['Direct'] := 'True';
UniConnection.SpecificOptions.Values['EnableLoadExtension'] := 'True';
UniConnection.Connect;
UniConnection.ExecSQL('SELECT load_extension(''json1.dll'')')
...
Code: Select all
...
UniConnection.ExecSQL('CREATE TABLE test_table (id INTEGER, json_field JSON);');
UniConnection.ExecSQL('insert into test_table (id, json_field) values (1, json(''{"name":"donald"}''));');
UniConnection.ExecSQL('insert into test_table (id, json_field) values (2, json(''{"name":"melania"}''));');
...