[QGIS-Developer] travis failing with: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user 'sa'..

Alessandro Pasotti apasotti at gmail.com
Thu Aug 29 11:06:39 PDT 2019


I think that some logic to retrieve a pk for a view would be great to have.

If I'm not wrong, the data source select dialog offers a pk when you select
a view, maybe it's just easy as porting that logic to the provider and use
it to guess the PK if there's no information in the URI.


On Thu, Aug 29, 2019, 17:47 Sandro Santilli <strk at kbt.io> wrote:

> On Thu, Aug 29, 2019 at 12:35:45PM +0100, Jorge Gustavo Rocha wrote:
> >
> > https://cdash.orfeo-toolbox.org/viewTest.php?onlyfailed&buildid=14455
> >
> > That is related to your PR, right?
>
> Ok, it was actually my PR.
> Wasn't easy to spot the problem, because the QgsVectorLayer.isValid()
> call doesn't tell what's invalid about a layer, but at the end the
> problem was that QGIS was not able to find a primary key for a view.
>
> I've added the primary key manually as part of the URI, as the test
> is meant to test something different and didn't want to get distracted
> by that, but if you think QGIS should be capable of finding a working
> primary key in a view I'll file a ticket for that.
>
> Other issue: sslmode needed to be disabled for the test to pass.
>
> My PR is now Travis-Green:
> https://github.com/qgis/QGIS/pull/31468
>
> --strk;
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190829/b618a599/attachment.html>


More information about the QGIS-Developer mailing list