[gdal-dev] How retrieve the list of field of a table on spatialite in pythonlang.

Andrea Peri aperi2007 at gmail.com
Thu Jul 3 09:01:09 PDT 2014


Hi,

I'm try-ing to retrieve the list of fieldname from a spatialite table.
To do this I try this code:

dataset = "select * from table1"
ds = driver.Open(file,False)
layer = ds.ExecuteSQL(dataset,None,"SQLITE")
layer.ResetReading()
layerDef = layer.GetLayerDefn()
.....

In the last line I'm having an error.

Is the comand "GetLayerDefn" available on sqlite driver ?

Thx,

Andrea.


-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------


More information about the gdal-dev mailing list