Hi Even, thx for response. I found the problem. Was a my error . I'm quite new-by on python.
You response help me to understand that the error was mine. Regards, Andrea. 2014-07-03 20:59 GMT+02:00 Even Rouault <[email protected]>: > Le jeudi 03 juillet 2014 18:01:09, Andrea Peri a écrit : >> 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. > > Andrea, > > Which error ? I've just tried on a spatialite db and it works fine. > >> >> Is the comand "GetLayerDefn" available on sqlite driver ? > > Yes, in all drivers. As soon as you have a non null layer object, you can call > GetLayerDefn(). > > Even > > -- > Geospatial professional services > http://even.rouault.free.fr/services.html -- ----------------- Andrea Peri . . . . . . . . . qwerty àèìòù ----------------- _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
