Hi all<br><br>Has anyone got much experience of using OGRVRT Data Sources in Windows with SQL server system DSNs? I am having an issue with system DSN connection type (windows authentication will work fine and proceses the table fine, sql authentication - get not trusted connection (both authentication types enabled in instance)) when testing via ogrinfo commandline.<br>
<br>Then if I take the working code forward then I can't render the layer in a map output via say shp2img commandline or final map application. Map code below:<br><br> LAYER<br> NAME "virtual"<br> TYPE POINT<br>
CONNECTIONTYPE OGR<br> CONNECTION "<OGRVRTDataSource> <br>
<OGRVRTLayer name='omreg1'> <br>
<SrcDataSource>ODBC:@omreg1</SrcDataSource> <br> <SrcSQL>SELECT * FROM dbo.Site</SrcSQL> <br>
<GeometryField encoding='PointFromColumns' x='SiteLong' y='SiteLat'/><br> <GeometryType>wkbPoint</GeometryType> <br> </OGRVRTLayer> <br>
</OGRVRTDataSource>" # the name and path to the virtual.ovf file, relative to shapepath may work?<br> DATA "omreg1"<br> TEMPLATE void<br> PROJECTION<br> "init=epsg:4326"<br> END<br>
METADATA<br> "wms_srs" "4326"<br> "wms_title" "virtual"<br> END<br> SIZEUNITS PIXELS<br> STATUS ON<br> TOLERANCE 0<br> TOLERANCEUNITS PIXELS<br>
UNITS METERS<br> CLASS<br> NAME "Virtual"<br> COLOR 255 0 0<br> OUTLINECOLOR 255 0 0<br> SYMBOL 'kreuz4'<br> SIZE 6<br> END # Class<br>END<br><br>My version of mapserver is a little old (5.6.1). I wonder whether I need to set any extra SQL related env variables.....<br>
<br>Any assistance much appreciated!<br><br>Thanks<br>Chris<br>