菜单->插件->python console
两条命令:
1.定义数据库链接:
uri = "MSSQL: server=.;database=maps;tables=county;trusted_connection=yes"
2.导入新图层:
qgis.utils.iface.addVectorLayer(uri,'thelayer','ogr')


菜单->插件->python console
两条命令:
1.定义数据库链接:
uri = "MSSQL: server=.;database=maps;tables=county;trusted_connection=yes"
2.导入新图层:
qgis.utils.iface.addVectorLayer(uri,'thelayer','ogr')

