[Qgis-user] No geometry for sql server

Christophe B ampouillle at gmail.com
Wed Apr 13 00:49:04 PDT 2011


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_connection=yes"


>>> qgis.utils.iface.addVectorLayer(conn_string,'test','ogr')


2011/4/12 Yves Jacolin <yjacolin at free.fr>

> 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 <ampouillle at gmail.com>
> 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
> > > Qgis-user at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> --
> Yves Jacolin
>
> http://yjacolin.gloobe.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110413/0f3fddd3/attachment.html>


More information about the Qgis-user mailing list