[unixODBC-support] question about unixodbc API

Mike Yue myue at semotus.com
Wed Aug 3 21:00:27 BST 2005


Hi buddies,

 

I got a problem with the unixodbc on redhat9.

I can access the SQLserver database successful via isql, like below:

 

[root at hippo9 fortest]#isql -v FIAT userid passwd

+---------------------------------------+

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

+---------------------------------------+

SQL> select * from hl_daemon

SQL>

[root at hippo9 fortest]#

[root at hippo9 fortest]#

 

But when I used the unixodbc API to do the same operation, my program
outputed:

 

[root at hippo9 fortest]# ./odbc

Error SQLConnect -1

[unixODBC][Driver Manager]Data source name not found, and no default
driver specified (0)

[root at hippo9 fortest]#

 

I am really confused with it. Is it possible that I missed something?

Any suggestion will be appreciated. Thanks a lot.

 

Mike.

Aug 3, 2005

 

 

Attached are the configuration files:

 

[root at hippo9 etc]# cat /usr/local/etc/odbcinst.ini

[TDS]

Description     = FreeTDS

Driver          = /usr/local/lib/libtdsodbc.so

Setup           = /usr/local/lib/libtdsS.so.1

UsageCount      = 1

 

[root at hippo9 etc]# cat /usr/local/etc/odbc.ini

[FIAT]

Driver          = TDS

Description     = ODBC connection via FreeTDS

Trace           = Yes

TraceFile       = /tmp/sql.log

ServerName      = MYFIAT

Database        = hiplink

Port            = 1433

[root at hippo9 etc]#

[root at hippo9 etc]# cat /usr/local/etc/freetds.conf

[JDBC]

        host = 192.138.151.39

        port = 4444

        tds version = 5.0

[JDBC_42]

        host = 192.138.151.39

        port = 4444

        tds version = 4.2

[mypool]

        host = 127.0.0.1

        port = 5000

        tds version = 4.2

[MYFIAT]

        host = 192.168.50.131

        port = 1433

        tds version = 8.0

[root at hippo9 etc]#

[root at hippo9 etc]#

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20050803/92a4d796/attachment.html>


More information about the unixODBC-support mailing list