Error when saving OGR.

Description

Hi,

I would like to update some values in a postgis layer. As I got memory write error, I tried to reduce the code as simple as possible :

var sites = GeoSource.OpenFromDatabase(pgCnx, "ccpav_v4_suf_rgf93");
ok = sites.Data.StartEditingShapes(true); => Ok is true
ok = sites.Data.StopEditingTable(true); => crash as follow

What is wrong ?Am I doing correctly ?

Environment

None

Activity

Show:
Olivier Leprêtre
January 17, 2016, 7:31 PM

I tried with differents table, I get the same crash with this line

var join = sites.Data.Table.IsJoined;

Olivier Leprêtre
January 17, 2016, 3:04 PM

That's what I did at the beginning, and as I was not able to save my table modifications I thought I could find problem more easily.

If I do
ok = sites.Data.StartEditingShapes(true);
ok = sites.Data.StopEditingShapes(true,true);

the second "ok" is false

Even if I try
ok = sites.Data.StopEditingShapes(false,false)

ok is still false

Paul Meems
January 17, 2016, 2:43 PM

When you call StartEditingShapes() you should also call StopEditingShapes() and not mix it with StopEditingTable().
Could you change your code and report back?

Thanks,

Paul

Assignee

Unassigned

Reporter

Olivier Leprêtre

Labels

None

Affects versions

Priority

High