Skip to Content.
Sympa Menu

freetds - Re: [freetds] Windows compile not working

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Linus <Linus AT mccabe.nu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Windows compile not working
  • Date: Sun, 7 Sep 2003 20:02:55 +0200


Thanks for your reply!

> It would be a good idea to get tsql working, because it's known code.

I did manage to get tsql to work after I sent the first mail, I had to
comment
out the parts that timed the query and I also had to remove the 'getpassword'
call, so password has to be specified on command line.

After that, tsql behaves just as my own program; it fails on connect and
gives
this output:
<<<
locale is "Swedish_Sweden.1252"
using default charset "ISO-8859-1"
There was a problem connecting to the server
>>>

In the log dump file, it dumped:

<<<
Starting log file for FreeTDS 0.62.dev.20030906
on 2003-09-07 19:43:03 with debug level 99.
19:43:03 Attempting to read conf files.
19:43:03 Found conf file 'c:/linus/freetds/freetds.conf' (from $FREETDSCONF).
Reading section '192.168.1.19'.
19:43:03 Looking for section global.
19:43:03 ... Found section global.
19:43:03 Got a match.
19:43:03 option = 'tds version' value = '4.2'.
19:43:03 option = 'swap broken dates' value = 'no'.
19:43:03 no is a 'no/off/false'.
19:43:03 option = 'swap broken money' value = 'no'.
19:43:03 no is a 'no/off/false'.
19:43:03 option = 'try server login' value = 'yes'.
19:43:03 yes is a 'yes/on/true'.
19:43:03 option = 'try domain login' value = 'yes'.
19:43:03 yes is a 'yes/on/true'.
19:43:03 option = 'nt domain' value = 'MCCABERS'.
19:43:03 option = 'cross domain login' value = 'no'.
19:43:03 no is a 'no/off/false'.
19:43:03 option = 'dump file' value = 'c:/freetds.log'.
19:43:03 option = 'debug level' value = '10'.
19:43:03 option = 'text size' value = '64512'.
19:43:03 ... Found section jdbc.
19:43:03 ... Found section jdbc_42.
19:43:03 ... Found section mypool.
19:43:03 ... Found section jay.
19:43:03 ... Found section 192.168.1.19.
19:43:03 Looking for section 192.168.1.19.
19:43:03 ... Found section global.
19:43:03 ... Found section jdbc.
19:43:03 ... Found section jdbc_42.
19:43:03 ... Found section mypool.
19:43:03 ... Found section jay.
19:43:03 ... Found section 192.168.1.19.
19:43:03 Got a match.
19:43:03 option = 'host' value = '192.168.1.19'.
19:43:03 Found host entry 192.168.1.19.
19:43:03 IP addr is 192.168.1.19.
19:43:03 option = 'port' value = '1433'.
19:43:03 option = 'tds version' value = '4.2'. <- I've tried 4.2 and
7.0
19:43:03 ...Success.
19:43:03 tds_config_login:458: client_charset is ISO-8859-1.
>>>

(I've tried altering freetds.conf in various ways, changing protocols,
including/exluding relevant entries and so forth)

The debug log gives:

<<<
Starting log file for FreeTDS 0.62.dev.20030906
on 2003-09-07 19:43:03 with debug level 99.
Using trivial iconv from
iconv.c
names for ISO-8859-1: ISO-8859-1
names for US-ASCII: US-ASCII
names for UCS-2LE: UCS-2LE
names for UCS-2BE: (null) <- Is this a problem?
iconv to convert client-side data to the "ISO-8859-1" character set
19:43:03 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
19:43:03 Connecting to 192.168.1.19 port 1433, TDS 4.2.
>>>

I proceeded to compile unittests as you suggested, I focused on t0002 (for
unknown reason - but t0001 fails just the same) and if I set it's verbose
flag, I get this output:

<<<
t0002.c: Test basic submit query, results
Entered tds_try_login()
Trying read_login_info()
Setting login parameters
Connecting to database
socket: Invalid argument <- happens in tds_connect()
tds_connect() failed
try_tds_login() failed
>>>

the dumped logs looks approximately the same as for tsql, I could not see any
major differences.

Has anyone successfully compiled FreeTDS with mingw? (I would assume so, as
there is a dev-cpp project file in CVS). If not, would anyone be willing to
release a binary dll for windows unless we can get this to work?

> What API are you using? From the symptoms, it sounds like you might be
> using libtds directly. It's easier to connect to the server (never mind
> get data from it) using the client libraries.

Yes, I'm using libtds directly - I based my code on the code in tsql and
didnt
have any major problems getting it to work on linux..

Anyway, until I hear from you again, Ill try focusing on the invalid argument
to select() and see if I can figure out where that comes from and if that
might be the cause of my problems...

Again, thanks for taking your time!

/Linus

>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page