comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL Dataminer and MySQL problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL Dataminer and MySQL problem [message #49751] Wed, 16 August 2006 02:27 Go to next message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
I'm trying to connect to a MySQL database from within IDL.

I could make it work on a windows PC after installing the appropriate
driver (MyODBC), but on a Linux PC (fedora), I'm having problems that
I couldn't google.



After installing the driver, I could connect to the database with
odbc3m. Following check with odbc3i gives this driver information:
odbc3i -q -d -n"MySQL ODBC 3.51 Driver"

Name............: MySQL ODBC 3.51 Driver
DRIVER..........: /usr/lib/libmyodbc3.so
SETUP...........: /usr/lib/libmyodbc3S.so



So I added the following information to odbc.ini:
[ODBC Data Sources]
...
MyODBC=MySQL ODBC 3.51 Driver

...
[MyODBC]
Driver = /usr/lib/libmyodbc3.so
Description = MySQL ODBC 3.51 Driver



Then I tried in IDL to connect like this:

objDB->Connect,connection="DRIVER={MySQL ODBC 3.51
Driver};SERVER=***;DATABASE=***; USER=***;PASSWORD=***;OPTION=3;"

and this gives the following error message (with verbose=1):

% IDLDBDATABASE::CONNECT: ODBC SQL
Function=SQLDriverConnect,STATE=631,CODE=0,
523 630

If you look for the error codes (e.g.
http://www.winsyslog.com/en/FAQ/odbc-error-codes.php ), 631 is not
mentioned. So I don't know what's going on.



Any ideas anyone?

Regards.
Wout.
Re: IDL Dataminer and MySQL problem [message #49823 is a reply to message #49751] Thu, 17 August 2006 12:46 Go to previous messageGo to next message
codepod is currently offline  codepod
Messages: 19
Registered: March 2006
Junior Member
I suspect the issue is the ODBC technology IDL uses. If I remember
correctly, the ODBC supplier ITT uses for the dataminer module only
allows the use of its drivers on UNIX/Linux platforms. On Windows you
can use any vendor's drivers.

Unfortunately, MySQL support for Linux isn't provided currently by IDL.
Some people have been successful using JDBC via the Java Export Bridge,
but at this point Dataminer on Linux isn't going to provide a solution
for MySQL.

The selection of this vendor and its policies are historical. When the
dataminer was developed 11 years ago, ODBC only existed natively on
Windows and a 3rd party was required to support ODBC on different
platforms. Today, ODBC system support is native on Windows, Mac and
Linux, but for now IDL is still using the vendor supplied system.


Cheers,
-CP

Wox wrote:
> I'm trying to connect to a MySQL database from within IDL.
>
> I could make it work on a windows PC after installing the appropriate
> driver (MyODBC), but on a Linux PC (fedora), I'm having problems that
> I couldn't google.
>
>
>
> After installing the driver, I could connect to the database with
> odbc3m. Following check with odbc3i gives this driver information:
> odbc3i -q -d -n"MySQL ODBC 3.51 Driver"
>
> Name............: MySQL ODBC 3.51 Driver
> DRIVER..........: /usr/lib/libmyodbc3.so
> SETUP...........: /usr/lib/libmyodbc3S.so
>
>
>
> So I added the following information to odbc.ini:
> [ODBC Data Sources]
> ...
> MyODBC=MySQL ODBC 3.51 Driver
>
> ...
> [MyODBC]
> Driver = /usr/lib/libmyodbc3.so
> Description = MySQL ODBC 3.51 Driver
>
>
>
> Then I tried in IDL to connect like this:
>
> objDB->Connect,connection="DRIVER={MySQL ODBC 3.51
> Driver};SERVER=***;DATABASE=***; USER=***;PASSWORD=***;OPTION=3;"
>
> and this gives the following error message (with verbose=1):
>
> % IDLDBDATABASE::CONNECT: ODBC SQL
> Function=SQLDriverConnect,STATE=631,CODE=0,
> 523 630
>
> If you look for the error codes (e.g.
> http://www.winsyslog.com/en/FAQ/odbc-error-codes.php ), 631 is not
> mentioned. So I don't know what's going on.
>
>
>
> Any ideas anyone?
>
> Regards.
> Wout.
Re: IDL Dataminer and MySQL problem [message #49870 is a reply to message #49751] Sun, 20 August 2006 04:51 Go to previous message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On Sat, 19 Aug 2006 20:58:32 +0000 (UTC), Marshall Perrin
<mperrin+news@serpens.berkeley.edu> wrote:

> Depending on how flexible your code is, I may have a solution for you.
> There's a series of pure IDL routines that access a MySQL database on
> Mac OS by opening a pipe to the command line MySQL application and
> passing text back and forth, from the Buie IDL library by Mark Buie et
> al. I've been using it for some time now with great success on Mac OS,
> and it should work just as well on Linux.
>
> The interface isn't quite as polished as the Dataminer, but it works
> cross-platform and the price is right. :-)
>
> http://www.lowell.edu/users/buie/idl/idl.html
>
> - Marshall

Ok thanks, I'll check it out.

Wout.
Re: IDL Dataminer and MySQL problem [message #49872 is a reply to message #49823] Sat, 19 August 2006 13:58 Go to previous message
Marshall Perrin is currently offline  Marshall Perrin
Messages: 44
Registered: December 2005
Member
codepod@gmail.com <codepod@gmail.com> wrote:
> I suspect the issue is the ODBC technology IDL uses. If I remember
> correctly, the ODBC supplier ITT uses for the dataminer module only
> allows the use of its drivers on UNIX/Linux platforms. On Windows you
> can use any vendor's drivers.
>
> Unfortunately, MySQL support for Linux isn't provided currently by IDL.
> Some people have been successful using JDBC via the Java Export Bridge,
> but at this point Dataminer on Linux isn't going to provide a solution
> for MySQL.
>
> The selection of this vendor and its policies are historical. When the
> dataminer was developed 11 years ago, ODBC only existed natively on
> Windows and a 3rd party was required to support ODBC on different
> platforms. Today, ODBC system support is native on Windows, Mac and
> Linux, but for now IDL is still using the vendor supplied system.

Depending on how flexible your code is, I may have a solution for you.
There's a series of pure IDL routines that access a MySQL database on
Mac OS by opening a pipe to the command line MySQL application and
passing text back and forth, from the Buie IDL library by Mark Buie et
al. I've been using it for some time now with great success on Mac OS,
and it should work just as well on Linux.

The interface isn't quite as polished as the Dataminer, but it works
cross-platform and the price is right. :-)

http://www.lowell.edu/users/buie/idl/idl.html

- Marshall
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Algorithm for lat/lon searching
Next Topic: 3D arrow.pro

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:16:48 PDT 2025

Total time taken to generate the page: 1.60085 seconds