Re: SQL Server version and TDS Version

Vinh Nguyen <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Mon, May 3, 2010 at 2:37 PM, Frediano Ziglio <[email protected]> wrote:
> Il giorno ven, 30/04/2010 alle 16.30 -0400, [email protected] ha
> scritto:
>> On Fri, Apr 30, 2010 at 02:58:12PM -0400, [email protected] wrote:
>> >
>> > 1.  API call e.g. DBSETLCHARSET().
>> > 2.  freetds.conf.
>> > 3.  nl_langinfo(3) /* query using CODESET parameter */
>> > 4.  setlocale(3) /* query using NULL parameter, split on "." */
>> > 5.  ISO 8859-1
>> >
>> > None of this works today, as you know.
>>
>> It works even less now.  I committed changes to tds_alloc_locale()
>> to get its initial values as I described.  glibc give a free backtrace
>> error.  I'm sure it's right, but I've run out of time.
>>
>
> strdup man, strdup !! :)
>
> I think I fixed the problem yesterday...

bsqldb and isql both works for me for v8.0.  However, tsql does not:

$ TDSDUMP=stderr TDSVER=8.0 tsql -S adrc -U USERNAME -P PASSWORD
locale is "en_US.utf-8"
locale charset is "utf-8"
log.c:196:Starting log file for FreeTDS 0.83.dev.20100504
        on 2010-05-16 12:42:50 with debug flags 0x4fff.
iconv.c:337:tds_iconv_open(0x1001007b0, utf-8)
iconv.c:197:local name for ISO-8859-1 is ISO-8859-1
iconv.c:197:local name for UTF-8 is UTF-8
iconv.c:197:local name for UCS-2LE is UCS-2LE
iconv.c:197:local name for UCS-2BE is UCS-2BE
iconv.c:365:setting up conversions for client charset "utf-8"
iconv.c:367:preparing iconv for "utf-8" <-> "UCS-2LE" conversion
iconv.c:443:tds_iconv_info_init: client charset name "" unrecognized
net.c:221:Connecting to 128.200.55.20 port 1433 (TDS version 7.1)
net.c:277:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:317:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
net.c:788:Sending packet
0000 12 01 00 34 00 00 00 00-00 00 15 00 06 01 00 1b |...4.... ........|
0010 00 01 02 00 1c 00 0c 03-00 28 00 04 ff 08 00 01 |........ .(..�...|
0020 55 00 00 02 4d 53 53 51-4c 53 65 72 76 65 72 00 |U...MSSQ LServer.|
0030 0f 6b 00 00            -                        |.k..|

net.c:604:Received header
0000 04 01 00 25 00 00 01 00-                        |...%....|

net.c:658:Received packet
0000 04 01 00 25 00 00 01 00-00 00 15 00 06 01 00 1b |...%.... ........|
0010 00 01 02 00 1c 00 01 03-00 1d 00 00 ff 09 00 0f |........ ....�...|
0020 d5 00 00 02 00         -                        |�....|

login.c:1044:detected flag 2
login.c:771:quietly sending TDS 7+ login packet
token.c:328:tds_process_login_tokens()
util.c:337:tdserror(0x1001001d0, 0x1001007b0, 20017, 0)
Msg 20017, Level 9, State -1, Server OpenClient, Line -1
Unexpected EOF from the server
util.c:367:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:390:tdserror: returning TDS_INT_CANCEL(2)
util.c:162:Changed query state from IDLE to DEAD
token.c:337:looking for login token, got  0()
token.c:122:tds_process_default_tokens() marker is 0()
token.c:125:leaving tds_process_default_tokens() connection dead
login.c:462:login packet accepted
util.c:337:tdserror(0x1001001d0, 0x1001007b0, 20002, 0)
Msg 20002, Level 9, State -1, Server OpenClient, Line -1
Adaptive Server connection failed
util.c:367:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:390:tdserror: returning TDS_INT_CANCEL(2)
mem.c:615:tds_free_all_results()
There was a problem connecting to the server

My main goal was getting isql to work (and now it does), this suffices
for me.  However, since u guys are getting so close to getting all
this to work, I'm willing to help debug and getting this resolved.

Many thanks!
Vinh
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.