[unixODBC-support] unixodbc on osx

Joshua Shaffner joshua.shaffner at gmail.com
Mon Oct 4 22:32:05 BST 2010


tsql works okay.

isql does not work.

I have burned a full day trying to get isql to work just so that I can
use apps on top of unixodbc. Yes, I did google but to no luck. :(

cheers, joshua

$ isql -v TEST user pwd
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect

$ odbcinst -j
unixODBC 2.3.0
DRIVERS............: /usr/local/Cellar/unixodbc/2.3.0/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/Cellar/unixodbc/2.3.0/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/Cellar/unixodbc/2.3.0/etc/ODBCDataSources
USER DATA SOURCES..: /Users/joshua/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

$ cat odbc.ini
[TEST]
Description = TDS
Driver = TDS
Servername = win7

$ cat odbcinst.ini
[TDS]
Description = TDS Test
Driver=/usr/local/lib/libtdsodbc.so

[ODBC]
Trace = Yes
TraceFile = /tmp/odbcinst_tr
ForceTrace = Yes

$ cat freetds.conf
[global
  host = 10.0.1.12
  port = 4321
  tds version = 7.0
  text size = 262144
  client charset = UTF-8]
[win7]
  host = 10.0.1.12
  port = 4321
  tds version = 7.0
  text size = 262144
  client charset = UTF-8

$ cat /tmp/odbcinst_tr

[ODBC][94462][1286227750.908927][__handles.c][459]
		Exit:[SQL_SUCCESS]
			Environment = 0x100801a00
[ODBC][94462][1286227750.909739][SQLAllocHandle.c][375]
		Entry:
			Handle Type = 2
			Input Handle = 0x100801a00
[ODBC][94462][1286227750.909786][SQLAllocHandle.c][493]
		Exit:[SQL_SUCCESS]
			Output Handle = 0x100820800
[ODBC][94462][1286227750.909833][SQLConnect.c][3654]
		Entry:
			Connection = 0x100820800
			Server Name = [TEST][length = 4 (SQL_NTS)]
			User Name = [********][length = 8 (SQL_NTS)]
			Authentication = [********][length = 8 (SQL_NTS)]
		UNICODE Using encoding ASCII 'char' and UNICODE 'UCS-2-INTERNAL'

		DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data source

[ODBC][94462][1286227750.923412][SQLConnect.c][4021]
		Exit:[SQL_ERROR]
[ODBC][94462][1286227750.923559][SQLError.c][434]
		Entry:
			Connection = 0x100820800
			SQLState = 0x7fff5fbfed50
			Native = 0x7fff5fbfeb48
			Message Text = 0x7fff5fbfeb50
			Buffer Length = 500
			Text Len Ptr = 0x7fff5fbfeb4e
[ODBC][94462][1286227750.923596][SQLError.c][471]
		Exit:[SQL_SUCCESS]
			SQLState = S1000
			Native = 0x7fff5fbfeb48 -> 0
			Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to connect to
data source]
[ODBC][94462][1286227750.923845][SQLError.c][434]
		Entry:
			Connection = 0x100820800
			SQLState = 0x7fff5fbfed50
			Native = 0x7fff5fbfeb48
			Message Text = 0x7fff5fbfeb50
			Buffer Length = 500
			Text Len Ptr = 0x7fff5fbfeb4e
[ODBC][94462][1286227750.923976][SQLError.c][471]
		Exit:[SQL_NO_DATA]
[ODBC][94462][1286227750.924020][SQLError.c][514]
		Entry:
			Environment = 0x100801a00
			SQLState = 0x7fff5fbfed50
			Native = 0x7fff5fbfeb48
			Message Text = 0x7fff5fbfeb50
			Buffer Length = 500
			Text Len Ptr = 0x7fff5fbfeb4e
[ODBC][94462][1286227750.924097][SQLError.c][551]
		Exit:[SQL_NO_DATA]
[ODBC][94462][1286227750.924151][SQLFreeHandle.c][286]
		Entry:
			Handle Type = 2
			Input Handle = 0x100820800
[ODBC][94462][1286227750.924203][SQLFreeHandle.c][337]
		Exit:[SQL_SUCCESS]
[ODBC][94462][1286227750.924246][SQLFreeHandle.c][219]
		Entry:
			Handle Type = 1
			Input Handle = 0x100801a00


More information about the unixODBC-support mailing list