[mapserver-users] SQL Server 2012 connection

saka royban sakaroyban at yahoo.com
Wed Jul 9 15:35:04 PDT 2014


Spending lots of hours, finally i get it to work.

Shortly speaking, it sounds it was all about the MS4W3.1.0beta. By changing
to MS4W 3.0.6, everything works well.

And my experience:
1- I tried using SQL Server 2008 express > no change
2- Thanks to informative option in QGIS ("Only look in geometry_columns
metadata table" in dialog of adding MSSQL layer), i found that there is no
'geometry_columns' and 'spatial_ref_sys' table in SQL Server. (Why the hell
Microsoft does not follow standards?!!!). Although i had loaded my
shapefiles via OGR, it didn't create those layers- as it supposed to do
that. I found a code for adding 'geometry_columns' and when i loded another
shapefile, it created 'spatial_ref_sys' table.

Hint: Its a good idea for shapefiles to have specified SRS and also to
specify SRID in connection string when loading shapefiles to SQL Server.

3- This error was making me crazy: ' Premature end of script headers:
mapserv.exe'
Changing MS4W package, now this error has been solved and i can view my
layer via Mapserver.

Hint: I couldnt get msplugin_mssql2008.dll to work. It sounds OGR is more
mature and using OGR more reasonable than that plugin.


I hope to my experince would be helpful to others wanna use MSSQL.

Regards



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/SQL-Server-2012-connection-tp5149799p5150372.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list