table of contents
other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
grass-odbc(1grass) | Grass User's Manual | grass-odbc(1grass) |
NAME¶
grass-odbc - ODBC driver ODBC driver ODBC driver in GRASS Communication between GRASS and ODBC database for attribute management:Supported SQL commands¶
All SQL commands supported by ODBC.Operators available in conditions¶
All SQL operators supported by ODBC.EXAMPLE¶
In this example we copy the dbf file of a SHAPE map into ODBC, then connect GRASS to the ODBC DBMS. Usually the table will be already present in the DBMS.Defining the ODBC connection¶
MS-Windows¶
On MS-Windows, in order to be able to connect, the ODBC connection needs to be configured using dedicated tools (tool called "ODBC Data Source Administrator") and give a name to that connection. This name is then used as database name when accessing from a client via ODBC.Linux¶
Configure ODBC driver for selected database (manually or with 'ODBCConfig'). ODBC drivers are defined in /etc/odbcinst.ini. Here an example:[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
[grass6test]
Description = PostgreSQL
Driver = PostgreSQL
Trace = No
TraceFile =
Database = grass6test
Servername = localhost
UserName = neteler
Password =
Port = 5432
Protocol = 8.0
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
Using the ODBC driver¶
Now create a new database if not yet existing:to_driver=odbc to_database=grass6test to_table=mytable
database=grass6test driver=odbc
SEE ALSO¶
db.connect, v.db.connect, unixODBC web site, SQL support in GRASS GIS Last changed: $Date: 2012-09-07 10:20:29 +0200 (Fri, 07 Sep 2012) $GRASS 6.4.4 |