<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body dir="auto">
<div>Yes. <br>
<br>
<div>Regards</div>
<div>Peter Schürch</div>
<span style="background-color: rgba(255, 255, 255, 0);">--<br>
Meier und Partner AG<br>
<a href="x-apple-data-detectors://1/0" x-apple-data-detectors="true" x-apple-data-detectors-type="address" x-apple-data-detectors-result="1/0">Freiestrasse 26</a><br>
<a href="x-apple-data-detectors://1/0" x-apple-data-detectors="true" x-apple-data-detectors-type="address" x-apple-data-detectors-result="1/0">8570 Weinfelden</a><br>
<a href="http://www.meierpartner.ch/" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="1/1">www.meierpartner.ch</a> <br>
T <a href="tel:+41%2071%20626%205115" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="1/2">+41 71 626 5115</a></span></div>
<div><br>
Am 04.05.2015 um 07:33 schrieb "Nathan Woodrow" <<a href="mailto:madmanwoo@gmail.com">madmanwoo@gmail.com</a>>:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">Hey Peter,<br>
<br>
Do you have a primary key on the table, or a column that is a int which is unique?<br>
<div><br>
</div>
<div>Regards,</div>
<div>Nathan</div>
</div>
<br>
<div class="gmail_quote">On Mon, 4 May 2015 at 15:31 Peter Schürch <<a href="mailto:p.schuerch@meierpartner.ch">p.schuerch@meierpartner.ch</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi James<br>
Unfortunately the error message is a lot less specific as I thought... QGIS complains (in german, sorry) that the layer is invalid...<br>
<br>
<br>
Layer ist ungültig: Der Layer dbname='geosfer' host=meiwes03 estimatedmetadata=true srid=0 table="dbo"."Borehole_Kind" sql= ist ungültig und kann der Karte nicht hinzugefügt werden<br>
<br>
This brings me back to the original question: what makes a flat table valid for QGIS? Is there any meta information needed somewhere?<br>
Hopefully you can make some sense of this.<br>
<br>
Cheers, Peter<br>
<br>
Von: James Wood [mailto:<a href="mailto:jwood911@gmail.com" target="_blank">jwood911@gmail.com</a>]<br>
Gesendet: Samstag, 2. Mai 2015 16:22<br>
An: Peter Schürch<br>
Betreff: Re: [Qgis-user] Add mssql non-geometric tables<br>
<br>
Hey Peter,<br>
Yes, the problem is a little clearer now, thanks. When adding what we refer to here as a "flat table" (i.e., no geometry), it always just adds as a table object, so I've never seen that error before. The exact error message would be helpful. Also, what version
 of SQL Server are you running? <br>
<br>
James<br>
Sent from my iPhone<br>
<br>
On May 2, 2015, at 04:01, Peter Schürch <<a href="mailto:p.schuerch@meierpartner.ch" target="_blank">p.schuerch@meierpartner.ch</a>> wrote:<br>
Hi James<br>
Thanks for getting back to me. <br>
I'using Wien too. <br>
The database connection is established. I can add existing geometry layers from the DB to the qgis project. I can also add new layers to the DB (e.g. A shape). So no fundamental problem with the DB. <br>
<br>
My problem is the following. <br>
I have defined a table in the DB without geometries, just numeric data. I can see it in the qgis browser but when i try to add it to my project i get an error saying that it is missing a crs. So i guess there is some meta info missing somewhere, but i wonder
 where and whether it has something to do with the metadata table 'geometry_colums' required for spatial layers. I need to look up the exact error message when I'm back in the office. <br>
<br>
Hope this is a little clearer now :-)<br>
Regards. <br>
Peter<br>
--<br>
Meier und Partner AG<br>
Freiestrasse 26<br>
8570 Weinfelden<br>
<a href="http://www.meierpartner.ch" target="_blank">www.meierpartner.ch</a> <br>
T +41 71 626 5115<br>
<br>
Am 01.05.2015 um 02:34 schrieb "James Wood" <<a href="mailto:jwood911@gmail.com" target="_blank">jwood911@gmail.com</a>>:<br>
Hey Peter. Did you get a response to your question? I may not be understanding exactly what you are trying to do, but if you go ahead and add your MSSQL instance and connect to the database, you will be presented with both spatial and non -spatial tables that
 you can add into the map. <br>
<br>
So, (not to patronize), if you go to Layer > Add Layer > Add MSSQL Spatial Layer, that will present a dialog where you can choose your instance from the drop down or create a new connection. The list of all available table objects will appear once you hit connect.
 I'm using 2.8 Wien.<br>
<br>
HTH and I haven't missed your question entirely. <br>
<br>
James<br>
Sent from my iPhone<br>
<br>
On Apr 30, 2015, at 13:55, Peter Schürch <<a href="mailto:p.schuerch@meierpartner.ch" target="_blank">p.schuerch@meierpartner.ch</a>> wrote:<br>
Hi<br>
Does anybody know how to add a non-geometric table from an mssql database to a qgis project?<br>
Do I need to add it in the table "geometry_columns"? If yes what would be the appropriate attribute values there?<br>
Thanks <br>
Peter Schürch<br>
--<br>
Meier und Partner AG<br>
Freiestrasse 26<br>
8570 Weinfelden<br>
<a href="http://www.meierpartner.ch" target="_blank">www.meierpartner.ch</a> <br>
T +41 71 626 5115<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote>
</div>
</div>
</blockquote>
</body>
</html>