Hello List,

We have encountered a problem on version 1.7 of QGIS (dev) can support the
connection to SQL Server 2008.

When it connects to the base layer does not contain any vector object and
the attribute table contains the correct columns and many rows, but they all
contain "ERROR" ...

Same problem on version 1.8 of GDAL :

When it connects to the base layer for export table to shapefile, error is :


Unable to open datasource
`MSSQL:server=.\SQLSERVER;database=ObservatoireCommerce;tables=dbo.T_
CommuneGeographie;trusted_connection=yes' with the fo
llowing drivers.

One of you has it managed to run this connection?

Thank you!

Christophe Baume

Code :

the sql table(2008) is defined as :

CREATE TABLE [dbo].[T_CommuneGeographie](

      [COMGEO_Id] [uniqueidentifier] ROWGUIDCOL  NOT NULL,

      [COMGEO_Commune_COM_Id] [uniqueidentifier] NOT NULL,

      [COMGEO_Geographie] [geography] NOT NULL,

      [COMGEO_DateDebut] [date] NULL,

      [COMGEO_DateFin] [date] NULL,

CONSTRAINT [PK_T_CommuneGeographie] PRIMARY KEY CLUSTERED

(

      [COMGEO_Id] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF
, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]



the lines entered into the console:


ogr2ogr -overwrite -f "ESRI Shapefile" "c:/test/test.shp"
"MSSQL:server=.\SQLSERVER;database=ObservatoireCommerce;tables=dbo.T_CommuneGeographie;trusted_connection=yes"

the lines entered into the python console:
conn_string =
"MSSQL:server=.\SQLExpress;database=ObservatoireCommerce;trusted_connection=yes;tables=dbo.T_CommuneGeographie"


qgis.utils.iface.addVectorLayer(conn_string,'test','ogr')
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to