[Qgis-user] Re: Missing primary key

palazzo pedro.palazzo at gmail.com
Mon Jan 16 10:43:32 PST 2012


I am having the same problem using QGIS 1.7.3 on a Mac (Snow Leopard) running
Python 2.6. Primary keys are not being imported at all when adding a new
vector layer from a MySQL database. No error messages appear. Tried with a
fresh QGIS file and a fresh database with identical results.

Oh, and before everyone lectures me on how I should be using PostGIS or
PostgreSQL instead of MySQL , let me add that I'm plugging QGIS onto a
preexisting CMS website database which handles primarily non-spatial data.

By the way, QGIS is painfully slow when reading data over a network
connection, even when compared to other GUI database tools such as
SequelPro.



Frank2100 wrote
> 
> This WAS a data issue. The solution came from Ben in the PostGIS mailing 
> list. The gid column used as the primary key was missing from the 
> geometry table. The solution was to delete the bad primary key and add 
> the gid column as a serial integer, then set  it as the table's primary 
> key. Everything works.
> 


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Missing-primary-key-tp5902743p7193615.html
Sent from the qgis-user mailing list archive at Nabble.com.



More information about the Qgis-user mailing list