Hello,
We have encountered a problem on version 1.7 of QGIS 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" ...
One of you has it managed to run this connection?
Thank you!
Christophe Baume
Code :
the sql table 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 python console:
conn_string =
"MSSQL:server=.\SQLExpress;database=ObservatoireCommerce;trusted_connection=yes;tables=dbo.T_CommuneGeographie(COMGEO_Geographie)"
qgis.utils.iface.addVectorLayer(conn_string,'test','ogr')
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer