<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>&gt; Would it be possible that you somehow extend the URI string with the table <BR>&gt; name? E.g.: 'MYSQL:dbname,user=username,password=secret,table=roads' or <BR>&gt; similar? In the ogr provider class, you could then analyse the string and <BR>&gt; 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>
&nbsp;<BR>
Regards<BR>
Godofredo<BR><BR><BR><BR><BR>

<HR id=stopSpelling>
<BR>
&gt; From: marco.hugentobler@karto.baug.ethz.ch<BR>&gt; To: frdcn@hotmail.com<BR>&gt; Subject: Re: [Qgis-developer] about ogr provider<BR>&gt; Date: Mon, 13 Aug 2007 17:10:25 +0200<BR>&gt; CC: qgis-developer@lists.qgis.org<BR>&gt; <BR>&gt; Hi Godofredo,<BR>&gt; <BR>&gt; It's nice to see the progresses with the ogr database plugin!<BR>&gt; <BR>&gt; &gt; The ogr plugin uses a visual form to connect to<BR>&gt; &gt; the dataset and show a list of available layers in the dataset, the user<BR>&gt; &gt; selects one and then the connection string is sended to ogr provider<BR>&gt; &gt; constructor via qgis interface mIface-&gt;addVectorLayer(URI ,<BR>&gt; &gt; layername, "ogr"); but only the URI is passed to ogr provider<BR>&gt; &gt; constructor.could it be possible to add an alternate constructor to ogr<BR>&gt; &gt; provider that gets URI and layernameso we could do a simple test for "PG:",<BR>&gt; &gt; "MYSQL:" and "OCI:" in URI and if true, use the layernameparameter?<BR>&gt; <BR>&gt; Would it be possible that you somehow extend the URI string with the table <BR>&gt; name? E.g.: 'MYSQL:dbname,user=username,password=secret,table=roads' or <BR>&gt; similar? In the ogr provider class, you could then analyse the string and <BR>&gt; change it to strings that OGR understands. <BR>&gt; <BR>&gt; In my opinion it is better to stay with the constructor of <BR>&gt; QgsVectorDataProvider that takes only one string. The advantage of this is <BR>&gt; that you are compatible with the interface of the other providers. Is this <BR>&gt; possible for the ogr database plugin or did I overlook something?<BR>&gt; <BR>&gt; <BR>&gt; Regards,<BR>&gt; Marco<BR>&gt; <BR>&gt; -- <BR>&gt; Dr. Marco Hugentobler<BR>&gt; Institute of Cartography<BR>&gt; ETH Zurich<BR>&gt; Technical Advisor QGIS Project Steering Committee<BR>&gt; 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>