[gdal-dev] OGRErr OGRLayer::CreateField // cant create fields
Mauro Pisano
mauropisano at suremptec.com.ar
Mon Jul 22 13:58:39 PDT 2013
Hi guys!
Im having a problem by using the OGRLayter::CreateField method, it isnt
creating the field as the description saids :).
Maybe you can see the error or have an idea to go out of this hole.
Here are the lines of code:
*...*
*...*
* OGRLayer* player = pvector->GetLayer(0);*
* if (player->GetLayerDefn()->GetFieldIndex(SUR_HOTLINK_FIELD) < 0) {*
// If the field doesnt exist, I create it.
* OGRFieldDefn field(SUR_HOTLINK_FIELD, OFTString);*
// Try to insert it to the table.
* if ( player->CreateField(&field, TRUE) == OGRERR_NONE )*
* SHOW_ERROR("D:Error trying to create field);*
* }*
*...*
*...*
*NOTES:*
the first line returns me without problems the Working Layer ( I just
using just 1 layer to avoid confusions )
the first IF returns that there arent any SUR_HOTLINK_FIELD in the table (
that its OK! )
and de last IF returns that the CreateField gives distinct as OGRERR_NONE.
Thanks in advance!
Mauro Pisano
SUR Emprendimientos Tecnológicos
Perú 345 Piso 5to Oficina "B" (C1067AAG)
Ciudad de Buenos Aires, Argentina
Tel. +54 (11) 4342-2976/84
mauropisano at suremptec.com.ar
www.suremptec.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130722/e51e4014/attachment.html>
More information about the gdal-dev
mailing list