[GRASSLIST:9597] Using unixODBC to connect GRASS to MySQL

Hello,

I am currently using Mac OS X 10.4.3 and GRASS 6.1.cvs. After having major problems using the MySQL driver in GRASS I have decided to try using unixODBC to connect GRASS to MySQL. However, I can not figure out how to call the DSN using db.connect and db.login. In short this is what I have been able to do:

1. Downloaded the MySQL Connector/ODBC 3.51.12 for OS X
http://dev.mysql.com/downloads/connector/odbc/3.51.html

2. Used this web link to figure out how to configure a myodbc dsn on Unix

http://dev.mysql.com/doc/refman/5.0/en/dsn-on-unix.html

[I am not sure if I configured the myodbc DSN correctly. I am still not sure how to correctly manipulate the odbc.ini.]

3. I then went to the X11 terminal to change the database settings in GRASS and set them to use odbc driver.

db.login driver=odbc database=“host=localhost,dbname=GRASS2” user=root password="

db.connect driver=odbc database=GRASS2 username=root
Sorry, is not a valid parameter

GRASS 6.1.cvs (san_joaquin2):~ > db.tables -p
DBMI-ODBC driver error: SQLConnect():
[unixODBC][Driver Manager]Data source name not found, and no default driver specified (0)

or I get this error

GRASS 6.1.cvs (san_joaquin2):~ > db.tables -p
DBMI-MYSQL driver error: mysql_real_connect() error (1044): Access denied for user ‘’@‘localhost’ to database ‘grass2’

I am not calling the DSN correctly. Any suggestions!!!

Thank you,

Nila Kreidich

Graduate Student Researcher
UC Davis Department of Hydrology

I believe the MySQL ODBC connector binary is meant for iODBC as provided by Apple in the system. GRASS uses UnixODBC.

GRASS can be made to use iODBC instead - I think the ODBC API is standard. I have built GRASS with iODBC instead of UnixODBC, but haven't tested it yet. I have an installer that you can try (it would be nice to get some testing to see if this works):

<http://www.kyngchaos.com/macosx/files/grass-6.1cvs.pkg.zip&gt;

This requires my Graphics Libs and GIS Libs installers from my site. It's the CVS from mid-November, I think. It's sortof in preparation to releasing my own Mac OS X binaries - it's lacking a proper readme and license file.

If you want to try building grass yourself with iODBC (unless you're using Lorenzo's binaries), try this: in configure change every instance of -lodbc to -liodbc (use case sensitive, whole words to avoid possibly damaging something else). GRASS configure will now find iodbc and build that in.

To configure iODBC for the MySQL connector, see the readme that comes with the MySQL connector - you use /Applications/Utilities/ODBC Administrator.app. I haven't really gotten very far with this, so I can't help with the gorey details.

On Dec 21, 2005, at 3:53 PM, Nila Kreidich wrote:

Hello,

I am currently using Mac OS X 10.4.3 and GRASS 6.1.cvs. After having major problems using the MySQL driver in GRASS I have decided to try using unixODBC to connect GRASS to MySQL. However, I can not figure out how to call the DSN using db.connect and db.login. In short this is what I have been able to do:

1. Downloaded the MySQL Connector/ODBC 3.51.12 for OS X
      http://dev.mysql.com/downloads/connector/odbc/3.51.html

2. Used this web link to figure out how to configure a myodbc dsn on Unix

     http://dev.mysql.com/doc/refman/5.0/en/dsn-on-unix.html

[I am not sure if I configured the myodbc DSN correctly. I am still not sure how to correctly manipulate the odbc.ini.]

3. I then went to the X11 terminal to change the database settings in GRASS and set them to use odbc driver.

db.login driver=odbc database="host=localhost,dbname=GRASS2" user=root password="

db.connect driver=odbc database=GRASS2 username=root
Sorry, <username> is not a valid parameter

GRASS 6.1.cvs (san_joaquin2):~ > db.tables -p
DBMI-ODBC driver error: SQLConnect():
[unixODBC][Driver Manager]Data source name not found, and no default driver specified (0)

or I get this error

GRASS 6.1.cvs (san_joaquin2):~ > db.tables -p
DBMI-MYSQL driver error: mysql_real_connect() error (1044): Access denied for user ''@'localhost' to database 'grass2'

I am not calling the DSN correctly. Any suggestions!!!

Thank you,

Nila Kreidich

Graduate Student Researcher
UC Davis Department of Hydrology

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

I believe the MySQL ODBC connector binary is meant for iODBC as
provided by Apple in the system. GRASS uses UnixODBC.

GRASS can be made to use iODBC instead - I think the ODBC API is
standard. I have built GRASS with iODBC instead of UnixODBC, but
haven't tested it yet. I have an installer that you can try (it
would be nice to get some testing to see if this works):

<http://www.kyngchaos.com/macosx/files/grass-6.1cvs.pkg.zip&gt;

Has anyone had luck connecting File Maker Pro on OSX to GRASS via *ODBC?

Hamish

That was something I was going to ask the list about. I had asked Nick Cahill offlist about testing my GRASS with iODBC (that's where that installer came from) and FileMaker. I haven't heard anything yet, so I was going to ask the list next, tho probably the dev list.

Maybe the user list would be better to ask. So, the download again:

<http://www.kyngchaos.com/macosx/files/grass-6.1cvs.pkg.zip&gt;

This GRASS is built with iODBC instead of UnixODBC. Or you can roll your own with iODBC by replacing -lodbc with -liodbc in configure.

There are a few Mac ODBC possibilities (available as binaries):

- MySQL - mentioned already.

- FileMaker - this needs someone with FileMaker Pro or Server 7+ to be able to test the ODBC driver, or access to a FileMaker Server database where someone can download and install the FileMaker ODBC driver (free, in the Developer/Resources section). ODBC driver installation is available as a separate pdf download, and should also be with the FileMaker software.

- MS Access - a tough one, but would give access (hehe) to the new GDAL/OGR Personal Geodatabase import feature. The drivers I found (EasySoft, $$$) act as a bridge, so you have to have a Windows PC with Access server ($$$), I think, on the other end.

Of course you could build other drivers for iODBC yourself if you have the source. But it's those ready-made, commercial ones that are what we want, and those are made for iODBC since that's what Apple gave us.

If anyone can test these, at least FileMaker, that would be great. If it works, maybe iODBC could be made as a config option for GRASS (ie a choice of UnixODBC or iODBC).

On Dec 21, 2005, at 6:17 PM, Hamish wrote:

I believe the MySQL ODBC connector binary is meant for iODBC as
provided by Apple in the system. GRASS uses UnixODBC.

GRASS can be made to use iODBC instead - I think the ODBC API is
standard. I have built GRASS with iODBC instead of UnixODBC, but
haven't tested it yet. I have an installer that you can try (it
would be nice to get some testing to see if this works):

<http://www.kyngchaos.com/macosx/files/grass-6.1cvs.pkg.zip&gt;

Has anyone had luck connecting File Maker Pro on OSX to GRASS via *ODBC?

Hamish

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

Hi all.
Just for you to know: we're planning to sponsor the development of a direct
MySQL driver for GRASS, so hopefully the issue will be solved soon.
If somebody need this functionality, additional sponsorship would be welcomed.
pc

At 00:01, giovedì 22 dicembre 2005, William Kyngesburye has probably written:

I believe the MySQL ODBC connector binary is meant for iODBC as
provided by Apple in the system. GRASS uses UnixODBC.

GRASS can be made to use iODBC instead - I think the ODBC API is
standard. I have built GRASS with iODBC instead of UnixODBC, but
haven't tested it yet. I have an installer that you can try (it
would be nice to get some testing to see if this works):

<http://www.kyngchaos.com/macosx/files/grass-6.1cvs.pkg.zip&gt;

This requires my Graphics Libs and GIS Libs installers from my site.
It's the CVS from mid-November, I think. It's sortof in preparation
to releasing my own Mac OS X binaries - it's lacking a proper readme
and license file.

If you want to try building grass yourself with iODBC (unless you're
using Lorenzo's binaries), try this: in configure change every
instance of -lodbc to -liodbc (use case sensitive, whole words to
avoid possibly damaging something else). GRASS configure will now
find iodbc and build that in.

To configure iODBC for the MySQL connector, see the readme that comes
with the MySQL connector - you use /Applications/Utilities/ODBC
Administrator.app. I haven't really gotten very far with this, so I
can't help with the gorey details.

--
Paolo Cavallini
email+jabber: cavallini@faunalia.it
www.faunalia.it
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy Tel: (+39)348-3801953

(I bumping this back to the list, Nick)

On Dec 22, 2005, at 1:28 AM, Nick Cahill wrote:

Dear William,

Sorry, it's been a very hectic couple weeks and I had to put off testing GRASS and Filemaker.

I hear you.

I just made a stab at it - installing the ODBC driver and such. I have FMP 7 and the driver, and hope they're configured correctly. However, when I run your GRASS, I get an error:

channel "console1" wasn't opened for writing
    while executing
"error $fh"
    (procedure "run_cmd" line 24)
    invoked from within
"run_cmd 2"
    invoked from within
".dialog1.run invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 23)
    invoked from within
"tk::ButtonUp .dialog1.run"
    (command bound to event)

so I can't run any GUI commands.

Is that right when you run grass in GUI mode? ie grass61 -gui. Oh, your tcl/wish settings might be looking at a different Tcl/Tk. Try setting this in your .bash_profile:

export GRASS_TCLSH=/usr/local/grasslibsx/bin/tclsh8.4
export GRASS_WISH=/usr/local/grasslibsx/bin/wish8.4

(or use setenv in .cshrc for the tcsh)

So I tried it from the command line. I had set up a FMPro database called ODBCTest, shared it from within FM, but I don't have the ODBC Admin program that lets me test whether the connection is actually set up - so there may be a problem there. .In any case I got:

GRASS 6.1.cvs (sardis):/usr/local/bin > db.connect driver=odbc database=ODBCTest
GRASS 6.1.cvs (sardis):/usr/local/bin > 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)

...

I think this is where the DSN comes in. As it says, iODBC doesn't have a DSN defined for the database you specified. The DSN ties a specific database name (what you use in db.connect) to an ODBC driver and source database. The GRASS docs for the db commands don't say much on this (maybe somewhere there is more info), but the GDAL docs on ODBC connections helped me to understand this. How you setup the DSN (parameters and such) is still hazy, all I know is you use ODBC Administrator.

Someone on the list might know more about ODBC. I hope we can get this working :slight_smile:

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy

On Dec 21, 2005, at 11:56 PM, Paolo Cavallini wrote:

Hi all.
Just for you to know: we're planning to sponsor the development of a direct
MySQL driver for GRASS, so hopefully the issue will be solved soon.
If somebody need this functionality, additional sponsorship would be welcomed.
pc

At 00:01, giovedì 22 dicembre 2005, William Kyngesburye has probably written:

I believe the MySQL ODBC connector binary is meant for iODBC as
provided by Apple in the system. GRASS uses UnixODBC.

GRASS can be made to use iODBC instead - I think the ODBC API is
standard. I have built GRASS with iODBC instead of UnixODBC, but
haven't tested it yet. I have an installer that you can try (it
would be nice to get some testing to see if this works):

<http://www.kyngchaos.com/macosx/files/grass-6.1cvs.pkg.zip&gt;

This requires my Graphics Libs and GIS Libs installers from my site.
It's the CVS from mid-November, I think. It's sortof in preparation
to releasing my own Mac OS X binaries - it's lacking a proper readme
and license file.

If you want to try building grass yourself with iODBC (unless you're
using Lorenzo's binaries), try this: in configure change every
instance of -lodbc to -liodbc (use case sensitive, whole words to
avoid possibly damaging something else). GRASS configure will now
find iodbc and build that in.

To configure iODBC for the MySQL connector, see the readme that comes
with the MySQL connector - you use /Applications/Utilities/ODBC
Administrator.app. I haven't really gotten very far with this, so I
can't help with the gorey details.

--
Paolo Cavallini
email+jabber: cavallini@faunalia.it
www.faunalia.it
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy Tel: (+39)348-3801953

I'm Interested.

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

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

On Dec 22, 2005, at 5:34 PM, William Kyngesburye wrote:

(I bumping this back to the list, Nick)

On Dec 22, 2005, at 1:28 AM, Nick Cahill wrote:

Dear William,

Sorry, it's been a very hectic couple weeks and I had to put off testing GRASS and Filemaker.

I hear you.

I just made a stab at it - installing the ODBC driver and such. I have FMP 7 and the driver, and hope they're configured correctly. However, when I run your GRASS, I get an error:

channel "console1" wasn't opened for writing
    while executing
"error $fh"
    (procedure "run_cmd" line 24)
    invoked from within
"run_cmd 2"
    invoked from within
".dialog1.run invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 23)
    invoked from within
"tk::ButtonUp .dialog1.run"
    (command bound to event)

so I can't run any GUI commands.

Is that right when you run grass in GUI mode? ie grass61 -gui. Oh, your tcl/wish settings might be looking at a different Tcl/Tk. Try setting this in your .bash_profile:

export GRASS_TCLSH=/usr/local/grasslibsx/bin/tclsh8.4
export GRASS_WISH=/usr/local/grasslibsx/bin/wish8.4

(or use setenv in .cshrc for the tcsh)

So I tried it from the command line. I had set up a FMPro database called ODBCTest, shared it from within FM, but I don't have the ODBC Admin program that lets me test whether the connection is actually set up - so there may be a problem there. .In any case I got:

GRASS 6.1.cvs (sardis):/usr/local/bin > db.connect driver=odbc database=ODBCTest
GRASS 6.1.cvs (sardis):/usr/local/bin > 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)

...

I think this is where the DSN comes in. As it says, iODBC doesn't have a DSN defined for the database you specified. The DSN ties a specific database name (what you use in db.connect) to an ODBC driver and source database. The GRASS docs for the db commands don't say much on this (maybe somewhere there is more info), but the GDAL docs on ODBC connections helped me to understand this. How you setup the DSN (parameters and such) is still hazy, all I know is you use ODBC Administrator.

Someone on the list might know more about ODBC. I hope we can get this working :slight_smile:

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy

Two things that might help:

- GRASS might need a login also with db.login after db.connect. This is probably something you setup in FileMaker when you share the DB.

- open the FileMaker port in the Mac firewall (on the Mac that's running FileMaker): System Prefs - Sharing - Firewall - New rule. Port=other, then enter the port you used in the DSN (both TCP & UDP just to be sure) and give it a name.

On Dec 22, 2005, at 3:14 PM, Nick Cahill wrote:

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

On Dec 22, 2005, at 5:34 PM, William Kyngesburye wrote:

(I bumping this back to the list, Nick)

On Dec 22, 2005, at 1:28 AM, Nick Cahill wrote:

Dear William,

Sorry, it's been a very hectic couple weeks and I had to put off testing GRASS and Filemaker.

I hear you.

I just made a stab at it - installing the ODBC driver and such. I have FMP 7 and the driver, and hope they're configured correctly. However, when I run your GRASS, I get an error:

channel "console1" wasn't opened for writing
    while executing
"error $fh"
    (procedure "run_cmd" line 24)
    invoked from within
"run_cmd 2"
    invoked from within
".dialog1.run invoke"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 23)
    invoked from within
"tk::ButtonUp .dialog1.run"
    (command bound to event)

so I can't run any GUI commands.

Is that right when you run grass in GUI mode? ie grass61 -gui. Oh, your tcl/wish settings might be looking at a different Tcl/Tk. Try setting this in your .bash_profile:

export GRASS_TCLSH=/usr/local/grasslibsx/bin/tclsh8.4
export GRASS_WISH=/usr/local/grasslibsx/bin/wish8.4

(or use setenv in .cshrc for the tcsh)

So I tried it from the command line. I had set up a FMPro database called ODBCTest, shared it from within FM, but I don't have the ODBC Admin program that lets me test whether the connection is actually set up - so there may be a problem there. .In any case I got:

GRASS 6.1.cvs (sardis):/usr/local/bin > db.connect driver=odbc database=ODBCTest
GRASS 6.1.cvs (sardis):/usr/local/bin > 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)

...

I think this is where the DSN comes in. As it says, iODBC doesn't have a DSN defined for the database you specified. The DSN ties a specific database name (what you use in db.connect) to an ODBC driver and source database. The GRASS docs for the db commands don't say much on this (maybe somewhere there is more info), but the GDAL docs on ODBC connections helped me to understand this. How you setup the DSN (parameters and such) is still hazy, all I know is you use ODBC Administrator.

Someone on the list might know more about ODBC. I hope we can get this working :slight_smile:

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

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@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
________________________________________________________________________

Yes, I found that documentation too, and followed it - plain ASCII, Host, Port, ServerDataSource, path to the internals of the bundled driver. They say that the OpenLink ODBC Administrator can test whether the connection is set up correctly, but the built-in Mac OSX version doesn't seem to have that capability; and I can't find the OpenLink version on the web. So I can't check whether things are working properly from the Filemaker/FM ODBC end. The error messages in db.test and db.describe seem to suggest that GRASS is seeing the SequeLink driver but getting no further with that - which might suggest that my ODBC setup isn't working right. Is there another way to test it?

I remember reading Lorenzo's message about problems with GRASS ODBC some months ago when this came up - Kurt Springs was particularly interested in this possibility. I think it would be a big plus to GRASS if it could access Filemaker databases. I suspect I'm not alone in having a lot of useful data in Filemaker, and not wanting to maintain that in two different databases.

Cheers,

Nick

On Dec 23, 2005, at 1:39 AM, William Kyngesburye wrote:

I found the FileMaker documentation PDFs at the FileMaker site, so now I have a beter understanding of this. When you setup the DSN, did you specify the Host, Port and ServerDataSource as Keywords? That error below implies that at least the Host (should be localhost) is missing in the DSN.

Also, they mention that only plain ASCII is supported in DB filenames (no accents or unicode). What it doesn't say is that probably also applies to the whole path to the database.

If you're already in holiday mode, Merry Xmas and I'll probably hear from you next week.

On Dec 22, 2005, at 3:46 PM, Nick Cahill wrote:

I hadn't set up Filemaker with any user or password protection; I added that, ran it through db.login, and it still didn't work.

I added the port to the Firewall, and then just turned the firewall off; still no luck.

Tried db.describe:

db.describe table=ODBCTestTable driver=odbc database=ODBCTest
DBMI-ODBC driver error: SQLConnect():
[DataDirect][ODBC SequeLink driver][SequeLink Client]TCP/IP host is not specified. (5154)

I'll have to go read up on ODBC, but not til after Christmas. Merry Christmas to all --

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan

Yeah, I never looked at ODBC because PG & MySQL have their own GRASS drivers.

I'm not sure what the protocol error thing is all about, I guess I'll have to try it myself to experience it. I can try the MySQL ODBC driver. At what point does that error appear? Your bug report wasn't exactly clear - is it in db.connect (that's what you imply), db.login or later when data is accessed from the connection? What ODBC driver did you use?

On Dec 22, 2005, at 5:54 PM, Lorenzo Moretti wrote:

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)

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy

I poked around at OpenLink. It looks like their ODBC Administrator is available in their Driver Manager SDK. It seems to be a free download, I just wasn't ready to fill in all the registration stuff yet to be able to download it.

I'll have to bug my boss about upgrading our old FM 5.5 so I can try this first-hand. Tho this would be FM 8. Or maybe someone with FM Server 7 or 8 can share a database on the net for testing purposes.

On Dec 22, 2005, at 11:40 PM, Nick Cahill wrote:

Yes, I found that documentation too, and followed it - plain ASCII, Host, Port, ServerDataSource, path to the internals of the bundled driver. They say that the OpenLink ODBC Administrator can test whether the connection is set up correctly, but the built-in Mac OSX version doesn't seem to have that capability; and I can't find the OpenLink version on the web. So I can't check whether things are working properly from the Filemaker/FM ODBC end. The error messages in db.test and db.describe seem to suggest that GRASS is seeing the SequeLink driver but getting no further with that - which might suggest that my ODBC setup isn't working right. Is there another way to test it?

I remember reading Lorenzo's message about problems with GRASS ODBC some months ago when this came up - Kurt Springs was particularly interested in this possibility. I think it would be a big plus to GRASS if it could access Filemaker databases. I suspect I'm not alone in having a lot of useful data in Filemaker, and not wanting to maintain that in two different databases.

Cheers,

Nick

On Dec 23, 2005, at 1:39 AM, William Kyngesburye wrote:

I found the FileMaker documentation PDFs at the FileMaker site, so now I have a beter understanding of this. When you setup the DSN, did you specify the Host, Port and ServerDataSource as Keywords? That error below implies that at least the Host (should be localhost) is missing in the DSN.

Also, they mention that only plain ASCII is supported in DB filenames (no accents or unicode). What it doesn't say is that probably also applies to the whole path to the database.

If you're already in holiday mode, Merry Xmas and I'll probably hear from you next week.

On Dec 22, 2005, at 3:46 PM, Nick Cahill wrote:

I hadn't set up Filemaker with any user or password protection; I added that, ran it through db.login, and it still didn't work.

I added the port to the Firewall, and then just turned the firewall off; still no luck.

Tried db.describe:

db.describe table=ODBCTestTable driver=odbc database=ODBCTest
DBMI-ODBC driver error: SQLConnect():
[DataDirect][ODBC SequeLink driver][SequeLink Client]TCP/IP host is not specified. (5154)

I'll have to go read up on ODBC, but not til after Christmas. Merry Christmas to all --

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro