Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 :

Error:
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 at 6:33
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.