<?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/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:li rdf:resource="http://comments.gmane.org/gmane.comp.db.tds.freetds/10565"/>
      </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/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 7</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 i</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 </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:
$ </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 </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 por</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</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 </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)</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>
  <item rdf:about="http://comments.gmane.org/gmane.comp.db.tds.freetds/10562">
    <title>timestamp truncation?</title>
    <link>http://comments.gmane.org/gmane.comp.db.tds.freetds/10562</link>
    <description>Using bsqlodbc, I get an error for the following query.  I think it's
related to conversion of a TIMESTAMP datatype.  We seem to be losing a
byte somewhere.  I'm not sure where the error is.  

bsqldb output is OK.  The problem appears to be in the ODBC layer or
perhaps between keyboard and chair.  

Results follow.  

--jkl


bsqldb output:

Data
          i  ts                          sd                           d
-----------  --  --------------------------  --------------------------
         42  00         Nov 14 2008 04:59PM         Nov 14 2008 04:58PM
Retrieving return status... none
1 rows affected


Query:

$ cat test/datetime.sql
use FreeTDS
go

create table at( i int, ts timestamp, sd smalldatetime, d datetime )
go
insert at (i, sd, d) values (42, getdate(), getdate())
select * from at
drop table at
go


Output:

$ (cd build/src/apps/ &amp;&amp; make) &amp;&amp; TDSDUMP=dump build/src/apps/bsqlodbc -S
varley -U jkl -P jkl -i test/datetime.sql -v -V3 2&gt;&amp;1 | tail -11
col     name                            type va</description>
    <dc:creator>James K. Lowden</dc:creator>
    <dc:date>2008-11-14T06:03:16</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>
