<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.db.tds.freetds">
    <title>gmane.comp.db.tds.freetds</title>
    <link>http://blog.gmane.org/gmane.comp.db.tds.freetds</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10641"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10615"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10613"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10611"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10605"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10600"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10599"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10598"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10595"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10593"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10590"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10584"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10581"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10579"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10576"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10573"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10572"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10571"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10570"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10569"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10641">
    <title>Finding the FreeTDS ODBC driver</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10641</link>
    <description>Hello,

I am working on a Linux box that was previously configured with FreeTDS.  An IT admin has "proven" that the box can communicate with SQL Server by successfully connecting to the database with the tsql command.  My questions are - Does a successful tsql connection confirm that a FreeTDS ODBC driver is installed on the box?  If so, is there a way to determine which ODBC driver is in use by the tsql command?

I am new to FreeTDS.  I have read the FreeTDS User Guide but cannot find some of the files or directories referenced in the doc.  These missing items make me suspicious that the ODBC driver is not installed and that tsql does not require an ODBC driver.

For example:

*         There is no "freetds" directory on the box as referenced in the section about setting environment variables.

*         This "freetds" directory is also referenced in the DSN-less configuration section in the Driver= example for the odbcinst.ini file.

*         The driver named in the Driver= parameter is libtdsodbc.so.  My goal is to find this file, but it does not exist on the system.

*         There is no "unittests" directory as referenced in the Confirming the Installation.

My tsql command is as follows:
tsql -S sql83 -U userid -P password -D _database_

When run, I see the message "Default database being set to _database_".  If I run tsql with a bogus database name, I receive a 'Cannot open database...' message.  The sql83 server is defined in /usr/local/etc/freetds.conf.  The [sql83] entry identifies the host, the port, and the tds version (8.0).

The /etc/odbc.ini file as referenced in Chapter 4 is empty.

Given the above, is it possible that I am working with an incomplete FreeTDS installation?  Or at a minimum, is it possible that the ODBC drivers were omitted from the install?

Thanks for any thoughts or direction,
Jeff
</description>
    <dc:creator>Jeff Dyson</dc:creator>
    <dc:date>2008-12-04T00:54:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10615">
    <title>Newbie php_dblib.dll</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10615</link>
    <description>Newbie question.
"Unable to connect: Adaptive Server is unavailable or does not exist"

Trying to get Sugarcrm through TDS to SQL Server 2005 running, and having a few problems ;-/

The server and database are up and running, but i just dont seem able to get the application to connect...I can connect without issues using other applications.

config.c:253:Success: [W2003TEST\SUGARCRMMSSQL] defined in c:\freetds.conf.
config.c:534:tds_config_login: client_charset is UTF-8.
iconv.c:363:iconv to convert client-side data to the "UTF-8" character set
iconv.c:516:tds_iconv_info_init: converting "UTF-8"-&gt;"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"-&gt;"UCS-2LE"
net.c:796:tds7_get_instance_port(127.0.0.1, SUGARCRMMSSQL)
net.c:879:instance info
0000 05 a5 00 53 65 72 76 65-72 4e 61 6d 65 3b 57 32 |...Serve rName;W2|
0010 30 30 33 54 45 53 54 3b-49 6e 73 74 61 6e 63 65 |003TEST; Instance|
0020 4e 61 6d 65 3b 53 55 47-41 52 43 52 4d 4d 53 53 |Name;SUG ARCRMMSS|
0030 51 4c 3b 49 73 43 6c 75-73 74 65 72 65 64 3b 4e |QL;IsClu stered;N|
0040 6f 3b 56 65 72 73 69 6f-6e 3b 39 2e 30 30 2e 31 |o;Versio n;9.00.1|
0050 33 39 39 2e 30 36 3b 74-63 70 3b 31 37 35 31 3b |399.06;t cp;1751;|
0060 6e 70 3b 5c 5c 57 32 30-30 33 54 45 53 54 5c 70 |np;\\W20 03TEST\p|
0070 69 70 65 5c 4d 53 53 51-4c 24 53 55 47 41 52 43 |ipe\MSSQ L$SUGARC|
0080 52 4d 4d 53 53 51 4c 5c-73 71 6c 5c 71 75 65 72 |RMMSSQL\ sql\quer|
0090 79 3b 76 69 61 3b 57 32-30 30 33 54 45 53 54 2c |y;via;W2 003TEST,|
00a0 30 3a 31 34 33 33 3b 3b-                        |0:1433;;|

net.c:917:instance port is 1751
net.c:187:Connecting to 127.0.0.1 port 1751 (TDS version 7.0)
net.c:241:tds_open_socket: connect(2) returned "Unknown error"
util.c:328:tdserror(01382518, 05531430, 20009, 183)
dblib.c:7583:dbperror(05530CB0, 20009, 0)
dblib.c:7646:"Unable to connect: Adaptive Server is unavailable or does not exist", client returns 2 (INT_CANCEL)

TDS reports version 0.63, 
Do I / should i try and move to a later release, and if so, does anybody know where we can find of a version 0.82/0.83 pre-build php_dblib.dll ? 
</description>
    <dc:creator>gary&lt; at &gt;idistech.demon.co.uk</dc:creator>
    <dc:date>2008-11-27T21:57:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10613">
    <title>Data-conversion resulted in overflow using FreeTDS andSQLServer</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10613</link>
    <description>We are using freetds 0.82 to connect to a MSQL database 2005.

When reading certain tables, using fisql, we have no errors but other 
tables give
the error:

error_handler: Data-conversion resulted in overflow.
for each line of results.

If I use DBArtisan on this database this does not occur.

Could someone please advise possible cause of error and how we might fix 
it.

The table where we have an error is pretty standard as follows:

CREATE TABLE PHONE_FAX
(
        ID          varchar(4)   COLLATE SQL_Latin1_General_CP1_CS_AS NOT 
NULL,
     ID_USER      varchar(9)   COLLATE SQL_Latin1_General_CP1_CS_AS NOT 
NULL,
     OR_PHONE     numeric(6,0) NOT NULL,
     DT_START     datetime     NULL,
     DT_END       datetime     NULL
     PRIMARY KEY CLUSTERED (ID_USER,OR_PHONE,ID)
)


Thanks.

Daymel
</description>
    <dc:creator>dmarrer&lt; at &gt;bci.cl</dc:creator>
    <dc:date>2008-11-27T18:26:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10611">
    <title>FreeTDS/unixODBC Best Practices</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10611</link>
    <description>Hi,

are there any Best Practices or recommendations on how to setup and or
configure FreeTDS + unixODBC (+ Perl + DBD::ODBC) for best (production)
performance?

Kind regards,

Stephan
</description>
    <dc:creator>Stephan Austermühle</dc:creator>
    <dc:date>2008-11-27T14:23:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10605">
    <title>possible corruption of TDS 5.0 login packet</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10605</link>
    <description>There might be a problem with the TDS 5.0 login packet.  Careful
examination of memory and the bytestream shows some strangeness that the
server doesn't seem to mind, but that I can't explain from the
documentation or the code.  

What follows is some TDSDUMP output (using new logging just added in CVS)
and a set of concerns.  

1.  The data passed to tds_put_login_string() frequently include data
beyond end-of-data.  The passed length is correct, but the bytes between
EOD and the end of the buffer are not zero.    Because the function relies
on the strlen of the passed string, it works OK, but it's odd.  

2.  The servername field is being overwritten by "SYBASE" even when it
should not be.

== LOG ==
log.c:190:Starting log file for FreeTDS 0.83.dev.20080708
on 2008-11-26 20:14:49 with debug flags 0x4fff.
iconv.c:337:tds_iconv_open(0x807e000, 646)
iconv.c:78:Using trivial iconv
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 (null)
iconv.c:365:setting up conversions for client charset "646"
iconv.c:367:preparing iconv for "646" &lt;-&gt; "UCS-2LE" conversion
iconv.c:404:preparing iconv for "ISO-8859-1" &lt;-&gt; "ISO-8859-1" conversion
iconv.c:407:tds_iconv_open: done
net.c:204:Connecting to 10.80.57.62 port 11025 (TDS version 5.0)
net.c:258:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:296:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:481:login string
0000 6e 74 63 35 30 30 33 2e-61 63 6d 6c 2e 63 6f 6d |clientN. abcd.com|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00       |........ ......|

# This ^^^ is the way I'd expect a login field to be sent. 

login.c:481:login string
0000 41 47 45 4e 54 39 39 00-00 00 00 00 00 00 00 00 |usrname. ........|
0010 53 48 49 4c 54 4f 4e 00-00 00 00 00 00 00       |passwrd. ......|

# The user_name field has the password at offset 16. 
# tds_put_login_string() uses strlen(3) to determine the EOD (here, 7). 

# The pattern continues for the next several fields. 

login.c:481:login string
0000 53 48 49 4c 54 4f 4e 00-00 00 00 00 00 00 00 00 |passwrd. ........|
0010 54 44 53 2d 4c 69 62 72-61 72 79 00 00 00       |TDS-Libr ary...|

login.c:481:login string
0000 33 37 38 37 36 00 55 6e-6b 6e 6f 77 6e 20 70 72 |37876.Un known pr|
0010 6f 74 6f 63 6f 6c 20 76-65 72 73 69 6f 6e       |otocol v ersion|

login.c:481:login string
0000 54 53 51 4c 00 00 00 00-00 00 00 00 00 00 00 00 |TSQL.... ........|
0010 41 47 45 4e 54 39 39 00-00 00 00 00 00 00       |usrname. ......|

login.c:481:login string
0000 53 59 42 41 53 45 00 00-00 00 00 00 00 00 00 00 |SYBASE.. ........|
0010 36 34 36 00 38 38 35 39-2d 31 00 00 00 00       |646.8859 -1....|

login.c:481:login string
0000 54 44 53 2d 4c 69 62 72-61 72                   |TDS-Libr ar|

login.c:481:login string
0000 75 73 5f 65 6e 67 6c 69-73 68 00 00 00 00 00 00 |us_engli sh......|
0010 73 74 70 63 73 00 00 00-00 00 00 00 00 00       |svrnm... ......|

# Note that "svrnm" is the true servername, but it is not the value that
# ends up in the login packet, see below.  

net.c:768:Sending packet
0000 02 00 02 00 00 00 00 00-6e 74 63 35 30 30 33 2e |........ clientN.|
0010 61 63 6d 6c 2e 63 6f 6d-00 00 00 00 00 00 00 00 |abcd.com ........|
0020 00 00 00 00 00 00 10 41-47 45 4e 54 39 39 00 00 |.......u srname..|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 07 53 48-49 4c 54 4f 4e 00 00 00 |......pa sswrd...|
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 07 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 05 03 01 06 0a-09 01 00 00 00 00 00 00 |........ ........|
0090 00 00 00 00 54 53 51 4c-00 00 00 00 00 00 00 00 |....TSQL ........|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 04 53 59 42 41 53-45 00 00 00 00 00 00 00 |...SYBAS E.......|
                                                         ^^^^^^^
# Item 2: This is not the servername looked up in freetds.conf 

00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00d0 00 06 00 07 53 48 49 4c-54 4f 4e 00 00 00 00 00 |....pass wrd.....|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 09 05 00 00 00 54 44-53 2d 4c 69 62 72 61 72 |......TD S-Librar|
01e0 0a 05 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|

login.c:481:login string
0000 69 73 6f 36 34 36 00 69-73 6f 5f 31 00 6b 6f 69 |iso646.i so_1.koi|
0010 38 00 6d 61 63 00 6d 61-63 5f 63 79 72 00       |8.mac.ma c_cyr.|

login.c:481:login string
0000 35 31 32 00 0a 50      -                        |512..P|

net.c:768:Sending packet
0000 02 01 00 61 00 00 00 00-00 00 00 00 00 00 0a 00 |...a.... ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 69 73 6f |........ .....iso|
0020 36 34 36 00 00 00 00 00-00 00 00 00 00 00 00 00 |646..... ........|
0030 00 00 00 00 00 00 00 00-00 00 00 06 01 35 31 32 |........ .....512|
0040 00 00 00 03 00 00 00 00-e2 16 00 01 09 00 08 0e |........ ........|
0050 6d 7f ff ff ff fe 02 09-00 00 00 00 02 68 00 00 |m....... .....h..|
0060 00                     -                        |.|

== EOL ==
</description>
    <dc:creator>James K. Lowden</dc:creator>
    <dc:date>2008-11-26T20:56:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10600">
    <title>FreeTDS dbwillconvert discrepancy</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10600</link>
    <description>Hello all,
I'm in the process of writing an application for OS X using FreeTDS and 
objective c.  I have come to a point however, that I am pretty confused. 
My application at this point is still using the sample provided with 
FreeTDS as in http://www.freetds.org/userguide/samplecode.htm but I am 
beginning to convert it to be part of a GUI application in Cocoa. 

I first used the sample to make sure that I can use it as shown, and 
with a specific query.  The sample as shown works completely.  I took 
the same code and with minor modifications put it into the GUI app and 
it does not work.  Now to give some more detailed information. 

My problem that I've narrowed it down to is with this stub of code
if (SYBCHAR != pcol-&gt;type) {           
                pcol-&gt;size = dbwillconvert(pcol-&gt;type, SYBCHAR);
            }

I've placed  "printf("name:%s type:%d size:%d\n", pcol-&gt;name, 
pcol-&gt;type, pcol-&gt;size);" around this piece of code so that I can see 
the before and after effects.  In the command line pure C application 
dbwillconvert returns the size of the would be data converted to the 
correct type.  This then lets the memory be allocated properly in the 
later calloc that uses pcol-&gt;size+1, as well as everything else to work 
as intended. 

However, in the Objective C/GUI version it appears to return a Bool.  It 
seems to return 1 if it is convertable and 0 if it is not.  This 
obviously messes up the rest of the allocations in the sample resulting 
in truncation and overflow errors.  I then looked into this farther and 
found http://www.freetds.org/reference/a00275.html#ga24 which from what 
I can tell is that the desired effect of that function is to return the 
bool. 

I'm not sure where to go to look for any more information.  Any advice 
is greatly appreciated.
           
</description>
    <dc:creator>Joe Losco</dc:creator>
    <dc:date>2008-11-26T17:56:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10599">
    <title>Configure FreeTDS as non-root</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10599</link>
    <description>I am a Windows developer, and am new to Unix. I am trying to "configure"
FreeTDS as a non-root user on Solaris 8 Sparc. I was successful with a
non-root account on my development Solaris 8 i386 server, but on the
production Sparc server, I have lower rights, and am not allowed to have
more.

I am getting errors running "configure" in this low rights environment.
Could you help?

I am using freetds-current.tgz dated 11-Nov-2008 09:01. When I run:
$ ./configure --with-tdsver=8.0 --prefix=/home/marko/freetds

it eventually bombs out with the errors:
config.status: executing depfiles commands
sort: getexecname() failed
Broken Pipe
sort: getexecname() failed

More info - when I googled this error (for example
http://forums.sun.com/thread.jspa?threadID=5092096), it seems that this
error could be caused by a missing /proc directory. I verified that it
is not listed when I run "ls -l /proc". 

I tried to fix this. I verified that /proc is listed in my /etc/vfstab
file as:
/proc-/procproc-no-

So then I did:
$ mkdir /proc

Then I tried to mount this /proc. But "mount" was not in my PATH. I
found several "mount" commands, the best one seemed to be in
/usr/lib/fs/proc. But the best I could do was:
$ /usr/lib/fs/proc/mount proc /proc
which gave me the error:
mount: not super user

Thank you for your help.
- Marko
</description>
    <dc:creator>Malyj, Mark</dc:creator>
    <dc:date>2008-11-26T17:29:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10598">
    <title>Memory leak or memory accumulation with freetds-0.82 ctlib's ct_cmd_alloc / ct_cmd_drop?</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10598</link>
    <description>

Hi all, 



Is there a known memory leak or memory accumulation issue with ct_cmd_alloc / ct_cmd_drop? 



I'm writing a program to poll a database as regular intervals and it gradually accumulates memory (seen via top). 



Below is source code to attempt and isolate the problem, compiled with the following command: 

   cc -o ctlib_leak ctlib_leak.c /usr/local/lib/libct.a /usr/lib/librt.a 



I am linking with the archive libraries to run against Purify if necessary. 


Quickest way to see memory eaten up (via top) is to direct stdout and stderr to /dev/null (so output doesn't slow down processing). 



Thanks in advance for any input or suggestions.  I can dig deeper, but wanted to know if this is a known issue. 



Regards, Michael 





Here is the source code for ctlib_leak.c: 



#include &lt;ctpublic.h&gt; 
#include &lt;signal.h&gt; 
#include &lt;stdio.h&gt; 



#define DB_SERVER_PORT "crunch3.localdomain 4100" 
#define DB_USER  "root" 
#define DB_PASSWORD "" 



#define RC_ERROR -1 
#define RC_GOOD  0 



#define TRUE  1 
#define FALSE  0 



int   signaled_to_exit; 
CS_CONTEXT  *cntx_ptr; 
CS_CONNECTION  *conn_ptr; 
CS_COMMAND  *cmd_ptr; 



void 
signal_handler(int i_signal) 
{ 
 printf("signaled received, will clean up and exit\n"); 
 signaled_to_exit = TRUE; 
 return; 

} 



main() 
{ 
 int rc; 



 // setup signal handling, so program exits polling loop cleanly 
 // NOTE:  NOT THREAD SAFE, SO IF MAKE MULTI-THREADED REVISIT SIGNALING 
 sigset_t newmask, oldmask; 
 signal(SIGINT, signal_handler); // for Ctrl-C (when run interactively) 
 signal(SIGTERM, signal_handler); 
 sigemptyset(&amp;newmask);  // initialize signal set 
 sigaddset(&amp;newmask, SIGINT); // add SIGINT to signal set 
 sigaddset(&amp;newmask, SIGTERM); // add SIGTERM to signal set 



 // allocate a context 
 rc = cs_ctx_alloc (CS_VERSION_100, &amp;cntx_ptr); 
 if (rc == CS_SUCCEED) { 
  printf("cs_ctx_alloc success\n"); 
 } else { 
  printf("cs_ctx_alloc FAILED\n"); 
  return(RC_ERROR); 
 } 



 // initialize the library 
 rc = ct_init (cntx_ptr,  CS_VERSION_100); 
 if (rc == CS_SUCCEED) { 
  printf("ct_init success\n"); 
 } else { 
  printf("ct_init FAILED\n"); 
  return(RC_ERROR); 
 } 



 // allocate a connection pointer 
 rc = ct_con_alloc(cntx_ptr, &amp;conn_ptr); 
 if (rc == CS_SUCCEED) { 
  printf("ct_con_alloc success\n"); 
 } else { 
  printf("ct_con_alloc FAILED\n"); 
  return(RC_ERROR); 
 } 



 // set the host and port 
 rc = ct_con_props(conn_ptr, CS_SET, CS_SERVERADDR, DB_SERVER_PORT, CS_NULLTERM, NULL); 
 if (rc == CS_SUCCEED) { 
  printf("ct_con_props success\n"); 
 } else { 
  printf("ct_con_props FAILED\n"); 
  return(RC_ERROR); 
 } 



 // set the username property 
 rc = ct_con_props(conn_ptr, CS_SET, CS_USERNAME, DB_USER, CS_NULLTERM, NULL); 
 if (rc == CS_SUCCEED) { 
  printf("ct_con_props success\n"); 
 } else { 
  printf("ct_con_props FAILED\n"); 
  return(RC_ERROR); 
 } 



 // set the password property 
 rc = ct_con_props(conn_ptr, CS_SET, CS_PASSWORD, DB_PASSWORD, CS_NULLTERM, NULL); 
 if (rc == CS_SUCCEED) { 
  printf("ct_con_props success\n"); 
 } else { 
  printf("ct_con_props FAILED\n"); 
  return(RC_ERROR); 
 } 



 // connect to the server 
 rc = ct_connect(conn_ptr, NULL, CS_UNUSED); 
 if (rc == CS_SUCCEED) { 
  printf("ct_connect success\n"); 
 } else { 
  printf("ct_connect FAILED\n"); 
  return(RC_ERROR); 
 } 



 signaled_to_exit = FALSE; 
 while (signaled_to_exit == FALSE) { 


  //************************************************************ 
  // CRITICAL SECTION START -- BLOCK SIGNALS WHILE PROCESSING 
  //************************************************************ 
  // block signals and save current signal mask 
  sigprocmask(SIG_BLOCK, &amp;newmask, &amp;oldmask); 



  rc = func(); 
  if (rc != RC_GOOD) 
   return(rc); 



  // resume the original signal mask 
  sigprocmask(SIG_SETMASK, &amp;oldmask, NULL); 
  //************************************************************ 
  // CRITICAL SECTION END -- UNBLOCK SIGNALS, ALLOW TO EXIT 
  //************************************************************ 
 } 



 // close connection to the database 
 rc = ct_close(conn_ptr, CS_UNUSED); 
 if (rc == CS_SUCCEED) { 
  printf("ct_close success\n"); 
 } else { 
  printf("ct_close FAILED\n"); 
  return(RC_ERROR); 
 } 



 // deallocate the connection 
 rc = ct_con_drop(conn_ptr); 
 if (rc == CS_SUCCEED) { 
  printf("ct_con_drop success\n"); 
 } else { 
  printf("ct_con_drop FAILED\n"); 
  return(RC_ERROR); 
 } 



 // exit client library 
 rc = ct_exit(cntx_ptr, CS_UNUSED); 
 if (rc == CS_SUCCEED) { 
  printf("ct_exit success\n"); 
 } else { 
  printf("ct_exit FAILED\n"); 
  return(RC_ERROR); 
 } 



 // deallocate the context structure 
 rc = cs_ctx_drop(cntx_ptr); 
 if (rc == CS_SUCCEED) { 
  printf("cs_ctx_drop success\n"); 
 } else { 
  printf("cs_ctx_drop FAILED\n"); 
  return(RC_ERROR); 
 } 



 return(RC_GOOD); 
} 



int 
func() 
{ 
 CS_RETCODE  rc; 



 // allocate a command structure 
 rc = ct_cmd_alloc(conn_ptr, &amp;cmd_ptr); 
 if (rc == CS_SUCCEED) { 
  printf("ct_cmd_alloc success\n"); 
 } else { 
  printf("ct_cmd_alloc FAILED\n"); 
  return(RC_ERROR); 
 } 



/**** MEMORY LEAK OR AT LEAST ACCUMULATING ****/ 



 // deallocate the command structure 
 rc = ct_cmd_drop(cmd_ptr); 
 if (rc == CS_SUCCEED) { 
  printf("ct_cmd_drop success\n"); 
 } else { 
  printf("ct_cmd_drop FAILED\n"); 
  return(RC_ERROR); 
 } 



 return(RC_GOOD); 
} 

_______________________________________________
FreeTDS mailing list
FreeTDS&lt; at &gt;lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
</description>
    <dc:creator>mtbrown88&lt; at &gt;comcast.net</dc:creator>
    <dc:date>2008-11-26T16:40:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10595">
    <title>SQL Anywhere 11</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10595</link>
    <description>We connect to many databases using FreeTDS, all of the databases out of our
control.  We a get a read only user/pass, an IP, a database name, and that
is IT.  Some of them run Sybase Adaptive Server, some run MSSQL, and now we
have two that upgraded to Sybase SQL Anywhere 11.

That being said, the two sites that upgraded are both having the same
issue.  When we try to connect, we are getting a "Login Incorrect".  We have
contact the clients, as well as the developers of the software.  Everybody
claims that we have the correct information, and that it works from remote
systems for them running the Sybase Interactive SQL client.  We have been
working on this for several days and one of us has begun banging his head
against the desk.

Before he knocks himself out, does anybody out there have any ideas?  I've
tried every TDS_Version setting, and have tried FreeTDS .63 that is in the
Debian repo, and .82 compiled from source.  Other than that, I'm not sure
what to try next.

-Brian
</description>
    <dc:creator>Brian Johnson</dc:creator>
    <dc:date>2008-11-26T09:13:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10593">
    <title>Need some help connectiing to MSSQL with tsql</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10593</link>
    <description>Hi Guys,
 
First time configuring TDS (&amp; this is on HPUX) &amp; trying to connect to an MSSQL 2005 DB server.
 
I can telnet to the host IP address &amp; port number fine but can not, when I try tsql.
It always seems to coredump 
 
# TDSVER=7.0 /usr/local/freetds/bin/tsql -H X.X.X.X  -p 20482  -U User -P Pass
locale is "C C C C C C"
locale charset is "roman8"
Memory fault(coredump)
 
# Here's the log file:
 
log.c:190:Starting log file for FreeTDS 0.83.dev.20081111
        on 2008-11-24 18:08:11 with debug flags 0x4fff.
iconv.c:337:tds_iconv_open(4000f080, roman8)
iconv.c:197:local name for ISO-8859-1 is iso81
iconv.c:197:local name for UTF-8 is utf8
iconv.c:197:local name for UCS-2LE is (null)
iconv.c:197:local name for UCS-2BE is ucs2
iconv.c:365:setting up conversions for client charset "roman8"
iconv.c:367:preparing iconv for "roman8" &lt;-&gt; "UCS-2LE" conversion
iconv.c:404:preparing iconv for "ISO-8859-1" &lt;-&gt; "UCS-2LE" conversion
iconv.c:407:tds_iconv_open: done
net.c:204:Connecting to X.X.X.X port 20482 (TDS version 7.0)
net..c:258:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:296:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:734:quietly sending TDS 7+ login packet
 
Any ideas? 
 
Cheers
Vince


      </description>
    <dc:creator>Vince ODea</dc:creator>
    <dc:date>2008-11-25T12:42:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10590">
    <title>freetds consulting</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10590</link>
    <description>Hello all,

Our company is rolling out a our PHP-based application to a large  
customer who has specifically requested MSSQL server support.  This is  
our first implementation using MSSQL.  We have recommended using Linux  
on the front end, but now we're worried about freetds support /  
scalability.

Can anyone provide some freetds support?  Ideally someone with  
experience running a large site with PHP/freetds and someone who  
understands the pitfalls of freetds?

Please send me your availability and a rate quote.

Thanks,
Andrew
</description>
    <dc:creator>Andrew Schmadeke</dc:creator>
    <dc:date>2008-11-24T21:17:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10584">
    <title>[PATCH] CTLib handling of NVARCHAR</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10584</link>
    <description>hi,

It seems that the CTLib implementation handles NVARCHAR strings as VARCHAR's.
These strings get converted to the single-byte character set when sent
to the MS-SQL server, which fails if the string actually contains a
multi-byte character.

The attached patch fixes this (tested with client charset = UTF-8).


Regards,
  Andrew Victor
_______________________________________________
FreeTDS mailing list
FreeTDS&lt; at &gt;lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
</description>
    <dc:creator>Andrew Victor</dc:creator>
    <dc:date>2008-11-24T14:42:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10581">
    <title>freetds, sybase or php error?</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10581</link>
    <description>
Hello,


our provider changed from php4 to php5. Since then we get same strange
return values from some functions, which do a SQL SELECT and returns the
single result value.


Here's some code:

&lt;?php
error_reporting(E_ALL);

include "../connect.syb.php";
syb_connect();

function NeuesDatum( $dDat, $nTage, $cVa, $cLand, $cPlz) {
list($tag, $monat, $jahr) = explode(".", $dDat);
$dDat = sprintf("%04d-%02d-%02d", $jahr, $monat, $tag);

$s = "SELECT DATEFORMAT(AddArbeitstage2Datum ( '$dDat', $nTage,
'KP623', $cVa, '$cLand', '$cPlz' ), 'dd.mm.yyyy')";
echo "SELECT: ".$s."&lt;br&gt;";

$q = sybase_query($s) or die('ungültig: '.$s);
echo "Anzahl Ergebnisse: ".sybase_num_rows($q)."&lt;br&gt;";

$r = sybase_result($q,0,0);
echo "&lt;pre&gt;";
var_dump($r);
echo "&lt;/pre&gt;";

return $r;
}

$Va = 1;
$Land = "D";
$Plz = "80333";
$Dat = "24.11.2008";
$x = 1;

echo "Starte NeuesDatum:&lt;br&gt;";
$y = NeuesDatum( $Dat, $x, $Va, $Land, $Plz);
echo "Zurück aus NeuesDatum:&lt;br&gt;";
echo "&lt;pre&gt;";
var_dump($y);
echo "&lt;/pre&gt;";
echo "Ende NeuesDatum:&lt;br&gt;";

?&gt;


Output with PHP4 (4.4.7):
Starte NeuesDatum:
SELECT: SELECT DATEFORMAT(AddArbeitstage2Datum ( '2008-11-24', 1,
'KP623', 1, 'D', '80333' ), dd.mm.yyyy')
Anzahl Ergebnisse: 1
string(10) "25.11.2008"
Zurück aus NeuesDatum:
string(10) "25.11.2008"
Ende NeuesDatum:

Output with PHP5 (5.2.6):
Starte NeuesDatum:
SELECT: SELECT DATEFORMAT(AddArbeitstage2Datum ( '2008-11-24', 1,
'KP623', 1, 'D', '80333' ), dd.mm.yyyy')
Anzahl Ergebnisse: 1
string(10) "25.11.2008"
Zurück aus NeuesDatum:
NULL
Ende NeuesDatum:


With php4 the result of the select is as wanted a string and the return
result is the same. With php5 this changed: within the function the
result is the same, but returned value is NULL.

Very interesting too, is the fact, that if I change both var_dump() to
  echo $var." (".strlen($var).")&lt;br&gt;";
the return changes again, but it is not NULL but a very long string(!):

PHP4:
within function: 25.11.2008 (10)
returned: 25.11.2008 (10)

PHP5:
within function: 25.11.2008 (10)
returned:  QÌh (150890260)


Any ideas??


Florian
</description>
    <dc:creator>Florian Kornhoffer</dc:creator>
    <dc:date>2008-11-24T12:23:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10579">
    <title>dblib and freetds.conf</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10579</link>
    <description>Hi,
I've got freetds .082 compiled, linked into my program and connecting successfully to SQL Server 2008 and 2005.  I'd like to jettison the usage of freetds.conf.  I know tisql does it by not using dblib.  Is there a way to specify the server/port etc without having any entries in the freetds.conf file?

Many thanks




      </description>
    <dc:creator>Mike Johnston</dc:creator>
    <dc:date>2008-11-22T18:40:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10576">
    <title>Freetds connection problem</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10576</link>
    <description>Hello Guys,

I am really totally lost with Freetds.

I will resume what is did.

First i am running SQL server 2005.

1) i did a telnet 1433 on my server and it work correclty so my
problem is not a firewall related problem.

2)In SQL server 2005 the server name is "MYSERVER\SL"

I created a file under /etc/freetds.conf

like this

-----
[MS1]
host = 192.168.10.50
port = 1433
tds version = 7.0


[MS2]
host = 192.168.10.50
port = 1433
tds version = 8.0


[MS3]
host = 192.168.10.50\SL
port = 1433
tds version = 7.0


[MS4]
host = 192.168.10.50\SL
port = 1433
tds version = 8.0


[MS5]
host = 192.168.10.50\sl
port = 1433
tds version = 7.0


[MS6]
host = 192.168.10.50\sl
port = 1433
tds version = 8.0
-----

i have tried every connection like this
 tsql -S MSSQL5 -U sa
etc...
everytimes i  got
There was a problem connecting to the server
Any hints ??


Thanks for you precious help !


Franck
</description>
    <dc:creator>Franck Y</dc:creator>
    <dc:date>2008-11-21T17:32:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10573">
    <title>FreeTDS vs. MSSQL 2008</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10573</link>
    <description>Hi!
I have 2 servers.
1. Web-server running FreeBSD 7.0-RELEASE amd64/Apache 2.2.6/PHP 
5.2.5/FreeTDS 0.64
2. Database server running MS Windows Web Server 2008 x86-64/MS SQL 
Server 2008 Enterprise x86-64
When I try to execute a stored procedure the error take place:
"Warning: mssql_execute(): stored procedure execution failed".
With MS SQL Sevrer 2000 all works fine.
Does FreeTDS 0.64 support MS SQL Sevrer 2008?

Thanks a lot.
_______________________________________________
FreeTDS mailing list
FreeTDS&lt; at &gt;lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
</description>
    <dc:creator>Igor Lidzhiev</dc:creator>
    <dc:date>2008-11-20T15:30:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10572">
    <title>charset problem with Sybase on SunOS server and Ubuntuclient</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10572</link>
    <description>look into it. 

Thanks very much for the information. We've since upgraded and still seeing the
same error. The log file is attached. Please, let me know if there's any more
information about the client/server you need.

TIA
log.c:190:Starting log file for FreeTDS 0.82
on 2008-11-19 22:26:47 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "UTF-8" character set
iconv.c:516:tds_iconv_info_init: converting "UTF-8"-&gt;"UCS-2LE"
net.c:210:Connecting to $IP_ADDRES port $PORT (TDS version 5.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
net.c:779:Sending packet
0000 02 00 02 00 00 00 00 00-6c 61 6d 70 2e 72 69 63 |........ $HOST...|
0010 68 6c 61 6e 64 2e 6c 69-62 2e 73 63 2e 75 73 00 |$CLIENT_DOMAIN...|
0020 00 00 00 00 00 00 17 73-61 00 00 00 00 00 00 00 |.......$UN.......|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 02 68 74-6f 32 32 37 00 00 00 00 |......$PASSWD....|
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 06 33 37 38-37 36 00 00 00 00 00 00 |.....378 76......|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 05 03 01 06 0a-09 01 00 00 00 00 00 00 |........ ........|
0090 00 00 00 00 50 48 50 20-35 00 00 00 00 00 00 00 |....PHP  5.......|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 05 68 70 5f 68 6f-72 69 7a 6f 6e 00 00 00 |...$SERVERNAME...|
00c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00d0 00 0a 00 06 68 74 6f 32-32 37 00 00 00 00 00 00 |....$PASSWD......|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 08 05 00 00 00 44 42-2d 4c 69 62 72 61 72 79 |......DB -Library|
01e0 0a 05 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|

net.c:779:Sending packet
0000 02 01 00 61 00 00 00 00-00 00 00 00 00 00 0a 00 |...a.... ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 55 54 46 |........ .....UTF|
0020 2d 38 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |-8...... ........|
0030 00 00 00 00 00 00 00 00-00 00 00 05 01 35 31 32 |........ .....512|
0040 00 00 00 03 00 00 00 00-e2 16 00 01 09 00 08 0e |........ ........|
0050 6d 7f ff ff ff fe 02 09-00 00 00 00 02 68 00 00 |m....... .....h..|
0060 00                     -                        |.|

token.c:312:tds_process_login_tokens()
net.c:592:Received header
0000 04 01 01 42 00 00 00 00-                        |...B....|

net.c:671:Received packet
0000 e5 64 00 69 09 00 00 02-0b 05 5a 5a 5a 5a 5a 00 |.d.i.... ..ZZZZZ.|
0010 01 00 49 00 43 61 6e 6e-6f 74 20 66 69 6e 64 20 |..I.Cann ot find |
0020 74 68 65 20 72 65 71 75-65 73 74 65 64 20 63 68 |the requ ested ch|
0030 61 72 61 63 74 65 72 20-73 65 74 20 69 6e 20 53 |aracter  set in S|
0040 79 73 63 68 61 72 73 65-74 73 3a 20 20 6e 61 6d |yscharse ts:  nam|
0050 65 20 3d 20 27 55 54 46-2d 38 27 2e 0a 06 53 59 |e = 'UTF -8'...SY|
0060 42 41 53 45 00 00 00 e5-38 00 6b 09 00 00 01 0a |BASE.... 8.k.....|
0070 05 5a 5a 5a 5a 5a 00 01-00 1d 00 4e 6f 20 63 6f |.ZZZZZ.. ...No co|
0080 6e 76 65 72 73 69 6f 6e-73 20 77 69 6c 6c 20 62 |nversion s will b|
0090 65 20 64 6f 6e 65 2e 0a-06 53 59 42 41 53 45 00 |e done.. .SYBASE.|
00a0 00 00 e3 0f 00 01 06 6d-61 73 74 65 72 06 6d 61 |.......m aster.ma|
00b0 73 74 65 72 e5 41 00 45-16 00 00 02 0a 05 5a 5a |ster.A.E ......ZZ|
00c0 5a 5a 5a 00 01 00 26 00-43 68 61 6e 67 65 64 20 |ZZZ...&amp;. Changed |
00d0 64 61 74 61 62 61 73 65-20 63 6f 6e 74 65 78 74 |database  context|
00e0 20 74 6f 20 27 6d 61 73-74 65 72 27 2e 0a 06 53 | to 'mas ter'...S|
00f0 59 42 41 53 45 00 00 00-e3 06 00 04 03 35 31 32 |YBASE... .....512|
0100 00 ad 14 00 05 05 00 00-00 0a 73 71 6c 20 73 65 |........ ..sql se|
0110 72 76 65 72 0c 05 00 00-e2 16 00 01 09 00 08 02 |rver.... ........|
0120 61 41 ff ff ff e6 02 09-00 00 00 00 02 00 00 00 |aA...... ........|
0130 00 fd 02 00 02 00 ee 00-00 00                   |........ ..|

token.c:316:looking for login token, got  e5(EED)
token.c:108:tds_process_default_tokens() marker is e5(EED)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
dbutil.c:86:_dblib_handle_info_message(0x95eeae8, 0x9642848, 0xbfbf6e0c)
dbutil.c:87:msgno 2409: "Cannot find the requested character set in Syscharsets:  name = 'UTF-8'.
"
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  e5(EED)
token.c:108:tds_process_default_tokens() marker is e5(EED)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
dbutil.c:86:_dblib_handle_info_message(0x95eeae8, 0x9642848, 0xbfbf6e0c)
dbutil.c:87:msgno 2411: "No conversions will be done.
"
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
dblib.c:325:db_env_chg(0x9642848, 1, master, master)
token.c:316:looking for login token, got  e5(EED)
token.c:108:tds_process_default_tokens() marker is e5(EED)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
dbutil.c:86:_dblib_handle_info_message(0x95eeae8, 0x9642848, 0xbfbf6e0c)
dbutil.c:87:msgno 5701: "Changed database context to 'master'.
"
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got  e3(ENVCHANGE)
token.c:108:tds_process_default_tokens() marker is e3(ENVCHANGE)
dblib.c:325:db_env_chg(0x9642848, 4, , 512)
token.c:316:looking for login token, got  ad(LOGINACK)
token.c:316:looking for login token, got  e2(CAPABILITY)
token.c:108:tds_process_default_tokens() marker is e2(CAPABILITY)
token.c:316:looking for login token, got  fd(DONE)
token.c:108:tds_process_default_tokens() marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
token.c:2232:                rows_affected = 238
token.c:393:leaving tds_process_login_tokens() returning 1
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to QUERYING
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
0000 0f 01 00 21 00 00 00 00-21 14 00 00 00 00 73 65 |...!.... !.....se|
0010 74 20 74 65 78 74 73 69-7a 65 20 36 34 35 31 32 |t textsi ze 64512|
0020 20                     -                        | |

token.c:495:tds_process_tokens(0x9642848, 0xbfbf6f28, 0xbfbf6f24, 0x100)
util.c:162:Changed query state from PENDING to READING
net.c:592:Received header
0000 04 01 00 11 00 00 00 00-                        |........|

net.c:671:Received packet
0000 fd 00 00 02 00 00 00 00-00                      |........ .|

token.c:510:processing result tokens.  marker is  fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232:                rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x9642848, 0xbfbf6f28, 0xbfbf6f24, 0x100)
token.c:498:tds_process_tokens() state is COMPLETED
dblib.c:237:dblib_add_connection(0xb73af340, 0x9642848)
dblib.c:4208:dbsetopt(0x9642148, 14, 2, -1)
dblib.c:1372:dbclose(0x9642148)
dblib.c:256:dblib_del_connection(0xb73af340, 0x9642848)
mem.c:563:tds_free_all_results()
util.c:162:Changed query state from IDLE to DEAD
dblib.c:303:dblib_release_tds_ctx(1)
dblib.c:5727:dbfreebuf(0x9642148)
dblib.c:718:dbloginfree(0x9642098)
dblib.c:1442:dbexit(void)
dblib.c:1442:dbexit(void)
dblib.c:303:dblib_release_tds_ctx(1)
_______________________________________________
FreeTDS mailing list
FreeTDS&lt; at &gt;lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
</description>
    <dc:creator>Frederick.Dubberspear&lt; at &gt;sogetthis.com</dc:creator>
    <dc:date>2008-11-20T03:41:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10571">
    <title>ct_connect returns failure</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10571</link>
    <description>Hi. This is my first post. I am a novice in freetds programming, and am
trying to connect to a Microsoft Server 2008. I am able to connect with
tsql -Svirtual -Usa -Ddatabase -Ppass. I have set the environment
variable TDSVER=8.0 . I am trying to use the included c code, but the
return at the last line in the following code is 0. What am I doing
wrong?
Loke

code:
int main()
{
CS_CONTEXT *ctx;
CS_CONNECTION *conn;
CS_COMMAND *cmd;
CS_RETCODE ret;
CS_RETCODE restype;
CS_DATAFMT datafmt[10];

   ret = cs_ctx_alloc(CS_VERSION_100, &amp;ctx);
   ret = ct_init(ctx, CS_VERSION_100);
   ret = ct_con_alloc(ctx, &amp;conn);
   ret = ct_con_props(conn, CS_SET, CS_USERNAME, "sa", CS_NULLTERM,
NULL);
   ret = ct_con_props(conn, CS_SET, CS_PASSWORD, "pass", CS_NULLTERM,
NULL);
   /* ret = ct_con_props(conn, CS_SET, CS_IFILE,
"/devl/t3624bb/myinterf", CS_NULLTERM, NULL); */
//always returns zero
   ret = ct_connect(conn, "virtual", CS_NULLTERM);
</description>
    <dc:creator>developer loke</dc:creator>
    <dc:date>2008-11-20T02:42:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10570">
    <title>CTLib and Unicode</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10570</link>
    <description>hi,

What is the correct CTLib bind type to use when calling a
stored-procedure having a NVARCHAR parameter?

I set the CS_DATAFMT.datatype field to CS_UNICHAR_TYPE in the call to
ct_param().
The data being bound is a UTF-8 string (and can be converted to UCS-2
using the command-line iconv utility).
My freetds.conf contains "client charset = UTF-8"

When calling ct_send(), the following client callback is generated:

[2008/11/19 16:32:59.069] ERROR : Client message:
[2008/11/19 16:32:59.070] ERROR : Message number: 98, Severity = 9,
Layer = 0, Origin = 0
[2008/11/19 16:32:59.070] ERROR : Message: Error converting characters
into server's character set. Some character(s) could not be converted

The dump file contains:
16:32:59.069348 4673 (ct.c:215):setting command state from IDLE to READY
16:32:59.069377 4673 (ct.c:3364):ct_param()
16:32:59.069391 4673 (ct.c:3365):ct_param() data addr = 0x804d6b7 data
length = 12
16:32:59.069405 4673 (ct.c:4341): _ct_fill_param() status = 256
16:32:59.069418 4673 (ct.c:2009):_ct_get_server_type(0)
16:32:59.069430 4673 (ct.c:3396): ct_param() added rpc parameter &lt; at &gt;Id
16:32:59.069576 4673 (ct.c:3364):ct_param()
16:32:59.069590 4673 (ct.c:3365):ct_param() data addr = 0x891e7d8 data
length = 4
16:32:59.069604 4673 (ct.c:4341): _ct_fill_param() status = 256
16:32:59.069618 4673 (ct.c:2009):_ct_get_server_type(25)
16:32:59.069631 4673 (ct.c:3396): ct_param() added rpc parameter &lt; at &gt;eMail
16:32:59.069645 4673 (ct.c:844):ct_send() command_type = 149
16:32:59.069664 4673 (ct.c:4256):paraminfoalloc: status = 256, maxlen 0
16:32:59.069678 4673 (ct.c:4257):paraminfoalloc: name = &lt; at &gt;Id, varint
size 2 column_type 47 size 12, 12 column_cur_size 12 column_output = 0
16:32:59.069692 4673 (ct.c:4085):paramrowalloc, size = 12, data =
0x891eca0, row_size = 0
16:32:59.069707 4673 (ct.c:4256):paraminfoalloc: status = 256, maxlen 0
16:32:59.069719 4673 (ct.c:4257):paraminfoalloc: name = &lt; at &gt;eMail, varint
size 2 column_type 39 size 4, 4 column_cur_size 4 column_output = 0
16:32:59.069733 4673 (ct.c:4085):paramrowalloc, size = 4, data =
0x89416b8, row_size = 0
16:32:59.069749 4673 (mem.c:563):tds_free_all_results()
16:32:59.069762 4673 (util.c:162):Changed query state from IDLE to QUERYING
16:32:59.069777 4673 (iconv.c:634):      XX - tds_iconv() charset
to_server: UTF-8 -&gt; UCS-2LE
16:32:59.069791 4673 (query.c:1292):tds_put_data_info putting param_name
16:32:59.069804 4673 (iconv.c:634):     XX - tds_iconv() charset
to_server: UTF-8 -&gt; UCS-2LE
16:32:59.069818 4673 (query.c:1326):tds_put_data_info putting status
16:32:59.069831 4673 (query.c:1420):tds_put_data: colsize = 12
16:32:59.069843 4673 (query.c:1449):tds_put_data: not null param varint_size = 2
16:32:59.069856 4673 (iconv.c:634):     XX - tds_iconv() charset
to_server: UTF-8 -&gt; CP1252
16:32:59.069870 4673 (query.c:1292):tds_put_data_info putting param_name
16:32:59.069883 4673 (iconv.c:634):     XX - tds_iconv() charset
to_server: UTF-8 -&gt; UCS-2LE
16:32:59.069904 4673 (query.c:1326):tds_put_data_info putting status
16:32:59.069917 4673 (query.c:1420):tds_put_data: colsize = 4
16:32:59.069930 4673 (query.c:1449):tds_put_data: not null param varint_size = 2
16:32:59.069942 4673 (iconv.c:634):     XX - tds_iconv() charset
to_server: UTF-8 -&gt; CP1252
16:32:59.069956 4673 (util.c:334):tdserror(0x891e878, 0x891ea00, 2402, 0)
16:32:59.070035 4673 (util.c:368):tdserror: client library returned
TDS_INT_CANCEL(2)
16:32:59.070049 4673 (util.c:389):tdserror: returning TDS_INT_CANCEL(2)
16:32:59.070063 4673 (util.c:162):Changed query state from QUERYING to PENDING
16:32:59.070076 4673 (net.c:849):Sending packet

The first parameter (&lt; at &gt;Id) is an ASCII string (CS_CHAR_TYPE) and the
2nd parameter (&lt; at &gt;eMail) is a UTF8 (CS_UNICHAR_TYPE) string.

The lines of debugging marked with "XX" I added.
So it looks like the CS_UNICHAR_TYPE parameter is being converted to
CP1252, which is the server's single-byte charset.

Am I using the wrong types, or is this a bug in FreeTDS?


Regards,
  Andrew Victor
</description>
    <dc:creator>Andrew Victor</dc:creator>
    <dc:date>2008-11-19T14:56:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10569">
    <title>dblib unit tests</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10569</link>
    <description>I began to modify our unit tests to work with Microsoft's db-lib.  Some of
our tests "pass" FreeTDS but fail with Microsoft's.  Some can't be
compiled.  

In the case of t0013, if failed because the test was wrong.  FreeTDS
permits dbwritetext() after dbresults() returns NO_MORE_ROWS, and t0013
took advantage of that.  Microsoft's library complained of an invalid
textptr.  Docs don't say, but the examples all call dbwritetext() -- with
another DBPROCESS -- after dbresults() returns REG_ROW.  

After modifying t0013 to work with Microsoft's library, it continues to
work with FreeTDS.  (Whew!)

BTW, the issue Ted Hayes raise is still broken; my first attempted fix was
wrong.  t0018 works fine with Microsoft's db-lib.  

If anyone else is interested in working on this, I'm happy to share my
nmake-compatible Makefile.  

More ahead.  

--jkl
</description>
    <dc:creator>James K. Lowden</dc:creator>
    <dc:date>2008-11-18T01:33:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10565">
    <title>Connectivity !</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10565</link>
    <description>Hello Friends,

I have MSSQL (2005) server in a domain.
I just installed freetds on a Unix computer.

i am sure that my password is good

i did a telnet
telnet myserver 1433 and it was ok.

After that i did
tsql -H myserver -p 1433 -U sa
It ask for my password but i get everytimes "There was a problem
conencting to the server"

Any hints ?

Thanks

</description>
    <dc:creator>Franck Y</dc:creator>
    <dc:date>2008-11-16T21:19:41</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.db.tds.freetds">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.db.tds.freetds</link>
  </textinput>
</rdf:RDF>
