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 was testing features of QGIS and its really cool.I tried to query each table using right click and query but I can't query sql server 2008 database :

An error occured when executing the query.
The data provider said:
[microsoft][odbc sql server driver][sql server] invalid object name 'table_test'
qodbc3:unable to execute statement

but it works fine with postgis. :Also is there any why to join table and do the query?

enter image description here

share|improve this question
the error hints that there is no table named SITES_2G , so wrong database or wrong schema would be my best guess or odbc driver is case sensitive (that depends how driver escapes table names – simplexio Apr 3 '14 at 6:33

I think you need to have a geometry_columns table in the database in order to connect. Nathan has some more details on this post

share|improve this answer
I have already connected to database but it's problem while I query the database – kinkajou Sep 7 '12 at 11:05

you need to define ODBC connection from Admintools -> "Data sources" use name as provider/DNS , then tell QGIS to use it. Also dont enable "only look in the geometry_columns table"

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.