[Qgis-user] No geometry for sql server
Yves Jacolin
yjacolin at free.fr
Wed Apr 13 01:07:20 PDT 2011
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 <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
--
Yves Jacolin
http://yjacolin.gloobe.org
More information about the Qgis-user
mailing list