In 2.16... (some really basic information I struggled to find and a note about an unhelpful error message)
The 'Connection Name' is a name for our own use.
The 'Provider/DSN' field can be left blank.
The 'Host' is a DNS name for the server or an IP address and specific port if not standard SQL port followed by instance name where required (eg. localhost\...
With the new "Processing" tools available in QGIS 2, this becomes a bit easier. While I have still not found a way to "live-link" the data (so that if you change the values in the MS Access table, the point moves automatically), this method seems to work pretty well.
Credit goes to "Christina" and "Bernd" in the comments section of this page (and of course ...
The issue 'QODBC3: Unable to connect' may be due to the configuration on the SQL server. Have your IT Admin 'enable' the Protocols TCP/IP and NamedPipe services for the database instance you are trying to connect to. This is performed in the SQL Server Configuration manager > Network Configuration . Also ensure the IP addresses have TCP Port = 1433 and the ...
You don't need odbc in this case.
The dsn argument of readOGR and ogrInfo is a text string, just like you would use with OGR in any other case. So, in your case, something like "PG:dbname=database".
RGDAL uses the OGR libraries, which uses the Postgres libraries directly to communicate with the database.
See the OGR PostgreSQL Format Docs for more info.
Here's the thing. Windows 64 bit stores the 64 bit odbcad.exe in the System32 folder. The one in the location that you're editing, c:\windows\syswow64\odbcad32.exe, is actually the 32 bit one. Hilarious right? 32 bit applications in the syswow64 folder, 64 bit applications in the System32 folder! There are reasons though.
Now, for QGIS, add the ODBC driver ...
Try uninstalling QGIS-64 bit and re-install QGIS-32 bit. Then try the odbc link. This trick worked for me, I think that QGIS-64 is looking in the wrong folder (the system32 folder) for the ODCB link. Using QGIS-32 will cause it to look in the SysWOW64 folder.
According to the Microsoft support page Which Access File Format should I use?, the .accdb format doesn't support user-level security, which means there's no way to control which users can access particular tables.
A related question on StackOverflow (MS Access: securing tables from unauthorized access) also has an answer with a comment providing anecdotal ...
I run the process on a server where both the 64-bits and 32-bits versions of Python are installed, as the server holds both ArcGIS Desktop and ArcGIS Server.
By default, the 64-bit version is launched, and my script fails. I forced the 32-bit version use by launching the script from the command line, and the update went through successfully.
Per the docs:
Currently the ODBC OGR driver is read-only, so new features, tables and datasources cannot normally be created by OGR applications.
Additionally, neither the PGeo nor MDB drivers support creation.
If you want to query by x & y coordinates, use Get Cell Value (Data Management) .
If you want to query by point features, you can use Sample (Spatial Analyst) or Extract Values to Points (Spatial Analyst).
If you want an array of raster values in an extent, you can use RasterToNumPyArray (arcpy).
starting since 4.2.0 loading the dynamic extension on the top of
SQLite3 is now based on "mod_spatialite" (a pure extension module, not
a classic shared library). You can eventually read more technical
details from here.
After some tests, I found a way to make it work:
download le lib spatialite-4.3.0a-win-x86.7z from here ;
unzip it in ...
So in 2D, the result is 1...
ST_GeomFromText('POLYGON((318830.663 301484.952,318821.415 301490.594,318814.969 301480.037 ,318824.223 301474.375,318830.663 301484.952 ))', 3163)
) AS "IsValid?";
It seems that a sqlite database cannot have stored spatial functions.
Spatial library are dynamicaly linked to the software opening the database through the loading of extensions.Spatially enable an SQLite database
The the SQLite3 ODBC driver (sqliteodbc) I use have an option to load a folder of extensions.
How to load Spatialite extension via SQLite3 ODBC ...
@TJBara - you were correct, I could connect fine so this rules out any driver issue.
It ended up being some security or privilege on the DB - basically, it didn't like ESRI or the ODBC connection viewing the data (?). My workaround was to create a view pointing to the views on another DB (same server) and this worked. This was actually a better way to do it ...
From what I understand, at the time enterprise geodatabases were being designed at ESRI, MySql simply was not extensible enough to support data structures needed for efficiently represent geographic data. In other words, you cannot define complex column types at will, create an index based on it, etc. Think about the feature geometry as a field, it can be ...
The tables are not being read because the user permissions (I believe for Admin) were not turned on inside the MS-Access DB. I turned them on for all the tables and QGIS loaded the tables (albeit somewhat slowly).
I did the following:
Put the DLLs in a different spot (NOT system32) - in my case c:\spatialite\bin. Note that you need more than just libspatialite - there are supporting DLLs that need to also be there.
Put the entire path in the extension box, not just the name.
Commence with great joy
Oddly enough I had already done the first step - so just adding c:\...