Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a MSSQL view containing data I want to show in QGIS. The view transforms a BLOB field containing WKB that is in one of my tables into a SQL geometry, which QGIS will be able to display.

When I connect to a MSSQL source from in QGIS the views aren't showing up. Is there an easy way to get them appearing?

Btw, I'm running QGIS 1.8.0-Lisboa on Windows 7.

Thanks for any help you can offer. Steve

share|improve this question
Why are you storing WKB as a BLOB and not just geometry? – Nathan W Jan 31 '13 at 6:57
Can you also post the view definition. – Nathan W Jan 31 '13 at 11:40
@NathanW, we are storing as WKB because there are systems attaching to this database that use LINQ2SQL in .NET code, which doesn't support the geometry types natively. WKB is more flexible and readily stored/used. Kind of a legacy code issue I guess. In terms of the view definition, it goes something along the lines of: SELECT TheId, geometry::STGeomFromWKB(TheWKB, 0) AS TheGeom FROM Data WHERE TheWKB IS NOT NULL – Steve Jan 31 '13 at 22:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.