The issue is not with the python code itself but rather something in the qgis code for the ogr provider. I know there is a bug there I'm just having trouble tracking down what it is.
On Wed, Apr 13, 2011 at 6:07 PM, Yves Jacolin <[email protected]> wrote: > Christophe, > > Why do you say the issue come from the python code? Your example shows > nothing > ;) > > What is the result of your last command? > > Y. > Le mercredi 13 avril 2011 09:49:04, Christophe B a écrit : > > Hello Yves, > > > > I tried to convert my table to a shapfile with ogr2ogr (GDAL 1.8.0, > > released 2011/01/02) and it works : my shapfile has geometry and > attribute > > data. It is therefore a problem whis python code ! > > > > >>> conn_string ="MSSQL:server=.\SQLEXPRESS; > > > > > database=ObservatoireCommerce;tables=dbo.T_CommuneGeographie;trusted_connec > > tion=yes" > > > > >>> qgis.utils.iface.addVectorLayer(conn_string,'test','ogr') > > > > 2011/4/12 Yves Jacolin <[email protected]> > > > > > Christophe, > > > > > > could you test ogr directly to connect to your SQL Server? For example > > > convert > > > sql server layer into shapefile. You will know if this is an ogr or > QGIS > > > issue. > > > > > > Y. > > > > > > Le mardi 12 avril 2011 12:39:21, Nathan Woodrow a écrit : > > > > This seems to be a bug, I have noticed it is happens mainly on > Windows > > > > > > XP > > > > > > > but Windows 7 also has this bug. I'm not sure where the problem is, > I > > > > suspect QGIS as OGR via command line returns the correct objects. > > > > > > > > - Nathan > > > > > > > > On Tue, Apr 12, 2011 at 8:16 PM, Christophe B <[email protected]> > > > > > > wrote: > > > > > Hello List, > > > > > > > > > > I now test the ability to connect to SQL Server data whis GDAL 1.8 > of > > > > > QGIS 1.7. > > > > > The connection is correct but I have no geometry in return, and the > > > > > > right > > > > > > > > attribute data (error). > > > > > Is a problem in GDAL / OGR? or QGIS 1.7? > > > > > > > > > > Should we open a new ticket ? > > > > > > > > > > Thank you in advance > > > > > > > > > > Christophe Baume > > > > > > > > > > _______________________________________________ > > > > > Qgis-user mailing list > > > > > [email protected] > > > > > http://lists.osgeo.org/mailman/listinfo/qgis-user > > > > > > -- > > > Yves Jacolin > > > > > > http://yjacolin.gloobe.org > > -- > Yves Jacolin > > http://yjacolin.gloobe.org > _______________________________________________ > Qgis-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-user >
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
