[GRASSLIST:9618] Re: Using unixODBC to connect GRASS to MySQL

Lorenzo Moretti lorenzo.moretti at bologna.enea.it
Thu Dec 22 18:54:32 EST 2005


Hi Nick and Hi William

>OK, I just tried it again, this time running grass61 -gui and so 
>avoiding the WISH and gui problems.
>
>I tried a bit more fussing with the setup. ODBC is a mystery to me, 
>and I'm probably messing it up. I tried installing the driver first 
>in my own Library/ODBC directory, then in the system wide 
>/Library/ODBC, and experimented with both system DSN and user DSN's. 
>The user DSN didn't work:
>
>db.test test=test1
>create table grass_test1 (i1 integer, d1 double precision, c1 varchar(20))
>DBMI-ODBC driver error: SQLConnect():
>[iODBC][Driver Manager]Data source name not found and no default 
>driver specified. Driver could not be loaded (0)
>
>... etc. etc....
>
>Setting up ODBC as a system DSN gave different errors:
>db.test test=test1
>create table grass_test1 (i1 integer, d1 double precision, c1 varchar(20))
>DBMI-ODBC driver error: SQLConnect():
>[DataDirect][ODBC SequeLink driver][SequeLink Client]TCP/IP error, 
>connection refused (2306)
>
>EXECUTE: ******** ERROR ********
>insert into grass_test1 values ( 1, 123.456, 'abcd' )
>DBMI-ODBC driver error: SQLConnect():
>[DataDirect][ODBC SequeLink driver][SequeLink Client]TCP/IP error, 
>connection refused (2306)
>
>So at least it seems to be locating the driver, but the driver isn't 
>connecting to the database?  Here the instructions that come with 
>FMP7 aren't that helpful to me; I'm sure they'd be enough for 
>someone who knows ODBC. I used the ODBC Administrator that comes 
>with Mac OSX 10.4.3, set up a System DSN with values Host=localhost, 
>Port=2399, ServerDataSource = database name, in this case just 
>ODBCTest. Filemaker is set up to share the database via ODBC, and is 
>running.
>
>Ideas?
>
>Nick Cahill
>

iODBC is a very good choice in Mac OS X but ... the problem is inside 
ODBC driver in Grass 6.x.
http://intevation.de/rt/webrt?serial_num=3154&display=History

I had built ODBC driver with iODBC but the result was the same.
- ODBC driver inside Grass 5.4.0 for OS X worked. Try my app in my site.
- ODBC driver inside Grass 6.x for OS X doesn't work.

It use the same library (unixODBC 2.2.8 and after 2.2.11).
I don't know if it works in Linux or Cygwin.

Is there someone that use ODBC inside Grass 6.x ?

Today ODBC inside Grass is not updated because most people use pg, 
mysql, dbf, sqlite (all work in OS X - see my tutorial for sqlite in 
last CVS).
But ODBC is the only choice if you have Oracle, MS SQL, and many other DB.

I'll try in the future to built Grass 5.4.0 with iODBC to vie the result.

If the ODBC driver in Grass will be update perhaps iODBC will work 
and perhaps FMPro could be used. (I hope)


Bye


-- 
________________________________________________________________________
||      Lorenzo Moretti        e-mail: lorenzo.moretti at bologna.enea.it
||/|/|  ENEA prot/idr          Web: http://wwwamb.bologna.enea.it/
||   |  via Don Fiammelli, 2   FTP: ftp://ftpamb.bologna.enea.it/ (ris.)
~~~~~~  40128 BOLOGNA - ITALY  Ph: +39-0516098086  Fax: +39-0516098131
________________________________________________________________________




More information about the grass-user mailing list