<div dir="ltr">At present, this is not so simple due to recent changes in gdal, but also to changes made to support duplicate layer-names only layerid is being used.<div><br></div><div>For QGIS compiled against gdal 1.*</div><div>using: <span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:11.9px;line-height:17.85px;background-color:rgba(0,0,0,0.0392157)">|layerid=n|layername=somename</span></div><div><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:11.9px;line-height:17.85px;background-color:rgba(0,0,0,0.0392157)"><br></span></div><div>should be used and in most cases work correctly.</div><div><br></div><div>At the moment an attempt to to open with 'layername' will first be attempted (without checks for duplicate names, thus the first will be taken) and if that fails, to open with layerid.</div><div><br></div><div>When gdal 2.* is being used, retrieving with layerid will fail after the first table that has more than 1 geometry.</div><div><br></div><div>The goal of the Grant Programme '9)​  Correction of QgsOgrProvider implementaion of GDAL 2.0' was to resolve this problem.</div><div><br></div><div>Mark Johnson</div><div><br></div></div>