Hi Pablo, On Wed, Feb 16, 2011 at 7:01 PM, Pablo Carreira <[email protected]>wrote:
> I'm trying to change the datasource of a postgis layer created with RT > SQL, I mean, I want to make changes in the query after the layer is > created. > the provider stores internally the datasource URI value when created and opens a connection to the database, so changing that value after doesn't affect the existent connection. BTW, why would you change that value after the layer is created? If you have a valid reason or you think this should be the right behavior, file a ticket on trac. Cheers. > I tried this: > > l=qgis.utils.iface.activeLayer() > d=l.dataProvider() > d.setDataSourceUri(u'dbname=\'postgis\' host.......') > l.reload() > > It's ok, but nothing happens. > Am I in the right path? What am I missing? > > > Pablo Torres Carreira > > > _______________________________________________ > Qgis-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-user > > -- Giuseppe Sucameli
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
