Skip to Content.
Sympa Menu

freetds - RE: [freetds] problem with fetching the result

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] problem with fetching the result
  • Date: Tue, 25 Nov 2003 09:07:41 -0000

Hi David,

If your diagnosis about the point of failure is correct, then all that is
wrong is that you are not setting the "format" field in the "destination
format" structure.
You have to tell cs_convert how you want the output formatted.

Null terminated - CS_FMT_NULLTERM
Padded with Blanks to the length you have specified - CS_FMT_PADBLANK
Padded with Nulls to the length you have specified - CS_FMT_PADNULL
or CS_FMT_UNUSED if you're not bothered.


see sybase manual for cs_convert:

http://manuals.sybase.com/onlinebooks/group-cn/cng1250e/comlib/@Generic__Boo
kView

go to "CS-Library routines" and see "cs_convert"


Bill



> -----Original Message-----
> From: David Nsengiyumva [SMTP:davidn AT finsolutions.co.za]
> Sent: 25 November 2003 06:00
> To: freetds AT lists.ibiblio.org
> Subject: [freetds] problem with fetching the result
>
> Hi There,
>
> I'm sending a query to a MS SQL Server 2000 using FreeTDS(ct-lib). And
> when
> fetching fields from the result, the 'cs_convert' function in cs.c file
> returns CS_FAIL. In fact what happens is that since the field is of type
> SYBTEXT then the 'switch (destfmt->format)' goes to 'default case' which
> just set 'ret' to CS_FAIL and then returns. What might be wrong???
>
> Best Regards
>
> David Nsengiyumva
>
> Software Developer
> Tel: +27 21 464 7215
> Cel: +27 73 351 3975
> Fax: +27 21 464 7201
> http://www.finsolutions.co.za
>
> CONFIDENTIALITY CAUTION
> This page and any accompanying documents contain privileged and
> confidential
> information for the specific individual to whom it is addressed, and are
> protected by law. If the reader is not the intended recipient, you are
> hereby notified that any review, dissemination, distribution or copying or
> the taking of any action based on the contents of this communication is
> strictly prohibited. If you have received this communication in error,
> please desist from reading the contents, notify us immediately and destroy
> the communication.
>
>
>
> _______________________________________________
> 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