[MapServer-users] Issue with ODBC Connection on 8.2.2 for OGR VRT Layer
Seth G
sethg at geographika.co.uk
Thu Sep 19 00:00:24 PDT 2024
Hi Tim,
A couple of suggestions to try.
1. Can you connect with the same connection string details using ogrinfo?
2. Are you able to test with the MSSQL driver in GDAL? https://gdal.org/en/latest/drivers/vector/mssqlspatial.html
Seth
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Wed, Sep 18, 2024, at 11:12 PM, Pascoe, Tim (ECCC) via MapServer-users wrote:
> I’ve spent a fair amount of time trying to track down an ODBC connection issue after upgrading to Mapserver 8.2.2
>
> Platform:
> Windows Server 2016
> IIS
> MS SQL Server 2016
> Mapserver 8.2.2 (binaries from GISInternals)
>
> Creating an ODBC connection using the MS administrator works, and the connection test is successful.
> The DSN is a System DSN using the ODBC Driver 17 for SQL Server
> The user account for the connection is confirmed to have access to the SQL View being used for a VRT layer using OGR
>
> Testing with OGRINFO on the following .ovf file:
>
> <OGRVRTDataSource>
> <OGRVRTLayer name='CABINsite'>
> <SrcDataSource>ODBC:****/***** @Cabinservice,qryWMSInternal</SrcDataSource>
> <SrcSQL>SELECT * FROM qryWMSInternal WHERE sitedetailsid = ****</SrcSQL>
> <FID>sitedetailsid</FID>
> <GeometryType>wkbPoint</GeometryType>
> <LayerSRS>WGS84</LayerSRS>
> <GeometryField encoding='PointFromColumns' x='longitude' y='latitude'/>
> </OGRVRTLayer>
> </OGRVRTDataSource>
>
> Generates the error “Failed to open datasource ‘ODBC:****/****…..”
>
> The same test in my production environment, using Mapserver 7.x, connects to the VRT layer and reports as expected.
>
> Anyone have something else I can look for? I’ve seen a number of posts in various forums with similar issues, but they all seem to resolve with an error in the connection string. Since I’m sure the format/credentials is correct, I’m not sure where else to look. Is there a change in how OGR/GDAL operates in the 8.2.2 binaries I have (security changes?) that would result in this issue?
>
> Thanks,
>
> Tim
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20240919/e55a33e2/attachment.htm>
More information about the MapServer-users
mailing list