Hi Georg, working with Postgres I would suggest you also use the postgres (pg) driver instead of ODBC. If you need to use ODBC, because you want to show it in your lesson, there are some hints in the GRASS wiki:
http://grass.gdf-hannover.de/wiki/Vector_Database_Management#ODBC regards, Otto On Thu, 29 Nov 2007 18:40:32 +0100 "Georg Lösel (privat)" <[EMAIL PROTECTED]> wrote: > Hi all, > > I need some help. > > OS: Debian Etch > > I try to connect GRASS [1] via odbc to my local PostgreSQL database. The > case is for a training lession about this gis. I connect to Postgres > because i have no other db. > > The direct contact to the PostgresQL runs without problems. > > I have this > > 1. > odbc.ini > > [grass_via_odbc] > Description = Test to Postgres > Driver = PostgreSQL > Trace = Yes > TraceFile = sql.log > Database = grass_nc > Servername = localhost > UserName = verysecret > Password = verysecret > Port = 5432 > Protocol = 8.1 > ReadOnly = No > RowVersioning = No > ShowSystemTables = No > ShowOidColumn = No > FakeOidIndex = No > ConnSettings = > odbc.ini (END) > > 2. > odbcinst.ini > > [PostgreSQL] > Description = PostgreSQL driver for Linux & Win32 > Driver = /usr/lib/odbc/libodbcpsqlS.so > Setup = /usr/lib/odbc/libodbcpsqlS.so > Threading = 2 > UsageCount = 1 > > both data located in my local home > > /home/georg/.odbc.ini > /home/georg/.odbcinst.ini > > Postgres runs > > ok now comes some grass stuff > > set connection > > GRASS 6.2.1 (solothurn):~/solothurn > db.login driver=odbc > database=grass_via_odbc user=secret password=secret > WARNING: The password was stored in file. > > check connection > > GRASS 6.2.1 (solothurn):~/solothurn > db.connect -p > driver:odbc > database:grass_via_odbc > schema:(null) > group:(null) > > and then when i try this > > > GRASS 6.2.1 (solothurn):~/solothurn > g.copy > vect=avdpool_liegen,liegen_odbc1 > COPY [EMAIL PROTECTED] to current mapset as [liegen_odbc1] > DBMI-ODBC driver error: SQLConnect(): > [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV > failed (0) > WARNING: Cannot open database 'grass_via_odbc' > no database is open > WARNING: Cannot copy table > WARNING: Cannot copy [EMAIL PROTECTED] to current mapset as > liegen_odbc1 > > > > Any idea where the problem is? > Any hint? > > Thanks in advance > > greeting Georg > > > > > > _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
