<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>> Would it be possible that you somehow extend the URI string with the table <BR>> name? E.g.: 'MYSQL:dbname,user=username,password=secret,table=roads' or <BR>> similar? In the ogr provider class, you could then analyse the string and <BR>> change it to strings that OGR understands. <BR><BR>
Yes, it is possible. I made a test with a similar<BR>
approach and it seems to work with mysql and<BR>
postgres. This approach needs only small changes<BR>
to the actual constructor.<BR>
<BR>
Regards<BR>
Godofredo<BR><BR><BR><BR><BR>
<HR id=stopSpelling>
<BR>
> From: marco.hugentobler@karto.baug.ethz.ch<BR>> To: frdcn@hotmail.com<BR>> Subject: Re: [Qgis-developer] about ogr provider<BR>> Date: Mon, 13 Aug 2007 17:10:25 +0200<BR>> CC: qgis-developer@lists.qgis.org<BR>> <BR>> Hi Godofredo,<BR>> <BR>> It's nice to see the progresses with the ogr database plugin!<BR>> <BR>> > The ogr plugin uses a visual form to connect to<BR>> > the dataset and show a list of available layers in the dataset, the user<BR>> > selects one and then the connection string is sended to ogr provider<BR>> > constructor via qgis interface mIface->addVectorLayer(URI ,<BR>> > layername, "ogr"); but only the URI is passed to ogr provider<BR>> > constructor.could it be possible to add an alternate constructor to ogr<BR>> > provider that gets URI and layernameso we could do a simple test for "PG:",<BR>> > "MYSQL:" and "OCI:" in URI and if true, use the layernameparameter?<BR>> <BR>> Would it be possible that you somehow extend the URI string with the table <BR>> name? E.g.: 'MYSQL:dbname,user=username,password=secret,table=roads' or <BR>> similar? In the ogr provider class, you could then analyse the string and <BR>> change it to strings that OGR understands. <BR>> <BR>> In my opinion it is better to stay with the constructor of <BR>> QgsVectorDataProvider that takes only one string. The advantage of this is <BR>> that you are compatible with the interface of the other providers. Is this <BR>> possible for the ogr database plugin or did I overlook something?<BR>> <BR>> <BR>> Regards,<BR>> Marco<BR>> <BR>> -- <BR>> Dr. Marco Hugentobler<BR>> Institute of Cartography<BR>> ETH Zurich<BR>> Technical Advisor QGIS Project Steering Committee<BR>> marco.hugentobler@karto.baug.ethz.ch<BR><BR><br /><hr />New home for Mom, no cleanup required. <a href='http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us' target='_new'>All starts here.</a></body>
</html>