Skip to Content.
Sympa Menu

freetds - Re: StarOffice, unixODBC, FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Martin Spott <mas AT plesnik.de>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: StarOffice, unixODBC, FreeTDS
  • Date: Wed, 20 Nov 2002 14:37:17 +0100


Hello James,

On Tue, Nov 19, 2002 at 04:55:50PM -0500, Lowden, James K wrote:

> There is a section in the UG about making FreeTDS work with a driver
> manager. Tell us what's missing. It's not clear to me what role StarOffice
> plays.

I already read the appropriate parts of the UG. So I'll tell you what's
going on. I compiled unixODBC-2.2.3:

# ./configure --prefix=/opt/unixODBC --enable-shared --disable-static \
--disable-threads
# [...]
# make install


I compiled freetds-0.6.0:

# ./configure --prefix=/opt/freetds --enable-shared --disable-static \
--enable-msdblib --enable-sybase-compat --with-unixodbc=/opt/unixODBC \
--disable-threads
# [...]
# make install

I have the following configuration:

quickstep: 14:19:45 /opt/unixODBC/etc> cat odbcinst.ini
[ODBC]
Trace = Yes
TraceFile = /tmp/sql.log
ForceTrace = Yes
Pooling = No
[FreeTDS]
Description = FreeTDS-0.6.0
Driver = /opt/freetds/lib/libtdsodbc.so
Setup = /opt/unixODBC/lib/libtdsS.so
FileUsage = 1
CPTimeout = 5
CPReuse = 5

quickstep: 14:21:29 /opt/unixODBC/etc> cat odbc.ini
[gluehbirne]
Description = Sybase ASE 11.0.3.3 on 'gluehbirne'
Servername = gluehbirne
Database = Orgdaten
Driver = FreeTDS
Port = 7543


I still use an old port number that was suggested for Sybase-10 on SCO
OpenServer years ago ....


quickstep: 14:22:44 /opt/freetds/etc> cat freetds.conf
[global]
tds version = 4.2
initial block size = 512
swap broken dates = no
swap broken money = no
try server login = yes
try domain login = no
cross domain login = no
[gluehbirne]
host = gluehbirne.plesnik.bonsai.de
port = 7543


Running:

# /opt/unixODBC/bin/isql gluehbirne mas <Password>


gives the following /tmp/sql.log and works quite fine:

[ODBC][1627][__handles.c][399]
Exit:[SQL_SUCCESS]
Environment = 0x804c7f8
[ODBC][1627][SQLAllocHandle.c][328]
Entry:
Handle Type = 2
Input Handle = 0x804c7f8
[ODBC][1627][SQLAllocHandle.c][448]
Exit:[SQL_SUCCESS]
Output Handle = 0x804cef0
[ODBC][1627][SQLConnect.c][2914]
Entry:
Connection = 0x804cef0
Server Name = [gluehbirne][length = 10 (SQL_NTS)]

User Name = [mas][length = 3 (SQL_NTS)]
Authentication = [*******][length = 7 (SQL_NTS)]
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'

[ODBC][1627][SQLConnect.c][3506]
Exit:[SQL_SUCCESS]


In StarOffice-5.2 I defined an ODBC connection with the identical parameters
as used with 'isql'. /tmp/sql.log looks like this:

[ODBC][1574][SQLAllocHandle.c][328]
Entry:
Handle Type = 2
Input Handle = 0x86129a8
[ODBC][1574][SQLAllocHandle.c][448]
Exit:[SQL_SUCCESS]
Output Handle = 0x8655f50
[ODBC][1574][SQLSetConnectAttr.c][212]Application tried to turn logging off
[ODBC][1574][SQLSetConnectAttr.c][281]
Entry:
Connection = 0x8655f50
Attribute = SQL_ATTR_LOGIN_TIMEOUT
Value = 0x14
StrLen = 0xfffffffa
[ODBC][1574][SQLSetConnectAttr.c][471]
Exit:[SQL_SUCCESS]
[ODBC][1574][SQLDriverConnect.c][600]
Entry:
Connection = 0x8655f50
Window Hdl = (nil)
Str In = [DSN=gluehbirne;UID=mas;PWD=*******][length
= 34]
Str Out = 0xbfffc860
Str Out Max = 4096
Str Out Ptr = 0xbfffc05e
Completion = 0
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'

DIAG [08001] Could not find Servername parameter

[ODBC][1574][SQLDriverConnect.c][1135]
Exit:[SQL_ERROR]
[ODBC][1574][SQLFreeHandle.c][250]
Entry:
Handle Type = 2
Input Handle = 0x8655f50
[ODBC][1574][SQLFreeHandle.c][301]
Exit:[SQL_SUCCESS]


The message "Could not find Servername parameter" lives in FreeTDS's
'odbc.c.' It appears that the DSN declaration in 'odbc.ini' is not getting
parsed correctly. It appears to me that 'odbcinst.ini' is read by the driver
manager and 'odbc.ini' by the ODBC driver itself. There is a symlink to
'/etc/odbc.ini' as expected in 'connectparams.c' so the configuration data
exists where the ODBC driver looks for.

Any clue - any help ?

Thanks for dealing with the case,
Martin.
--
Unix _IS_ user friendly - it's just selective about who its friends are !
--------------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page