Write to sqllite

Description

Hi,

It seems that write to sqlite with Ogr doesn't work. Requires Gdal upgrade ?

Thanks

Olivier

To reproduce :

CREATE TABLE test( name VARCHAR (254));

Code

Dim connOgr As OgrDatasource = New OgrDatasource
success = connOgr.Open(Context.sqlite)
connOgr.ExecuteSQL("Insert into test (name) values ('olivier');", msg)

msg => In ExecuteSQL(): sqlite3_step(Insert into test (name) values ('olivier'):
SQL logic error or missing database

Environment

None

Activity

Show:
Paul Meems
January 9, 2017, 9:32 AM
  • Added OgrDatasource.Open2 method with forUpdateParameter;

  • Flushing is added in OgrDatasource.CreateLayer (otherwise the new layer wasn't written to the disk in case of SQLite);

Changes are available since commit https://github.com/MapWindow/MapWinGIS/commit/637d0bf1f0c4b82c461362266a3410239c5f9aeb

Olivier LeprĂȘtre
January 11, 2017, 6:06 AM

Hi,

Fine, it works, I tried CREATE table, INSERT, DROP table, everything ok.

Thanks for this nice work !

Olivier

Assignee

Sergei Leschinsky

Reporter

Olivier LeprĂȘtre

Labels

None

Fix versions

Affects versions

Priority

Highest
Configure