freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
- To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] RE: FreeTDS Digest, Vol 9, Issue 9
- Date: Thu, 9 Oct 2003 12:42:00 +0100
the only reason I can think of why the the convert function should return
this error for a datetime is if the variable and variable length you have
specified on the bind as the target is insufficient size for the string
representation of the date (which looks like 19 bytes)
is your bound program variable 20+ bytes long ?
> -----Original Message-----
> From: David Nsengiyumva [SMTP:davidn AT finsolutions.co.za]
> Sent: 09 October 2003 11:48
> To: freetds AT lists.ibiblio.org
> Subject: [freetds] RE: FreeTDS Digest, Vol 9, Issue 9
>
> Hi there,
>
> Can anyone tell me how FreeTDS handles Date/Time and Currency values. I am
> running FreeTDS version 7.0 accessing MS SQL Sever and it works fine for
> anything else but Date/Time and currency values. Basically when I run a
> query that is supposed to return Date/Time values then the
>
> static int
> _ct_bind_data(CS_COMMAND * cmd) {
> ..............
> }
>
> in the ct-lib fails(returns CS_ROW_FAIL).
>
> The "srctype = curcol->column_type" has value 111(0x6F) and "desttype =
> _ct_get_server_type(curcol->column_bindtype)" has value 47(0x2F) and
> "srctype = _ct_get_client_type(curcol->column_type, curcol->column_size);"
> has value 6 (0x06)
>
> I have tried to step into the "cs_convert(CS_CONTEXT * ctx, CS_DATAFMT *
> srcfmt, CS_VOID * srcdata, CS_DATAFMT * destfmt, CS_VOID * destdata,
> CS_INT
> * resultlen)" function and get the following:
>
> src_type = 61(0x3D)
> src_len = 8
> desttype = 47(0x2F)
> destlen = 8
>
> The "TDS_INT tds_convert(TDSCONTEXT *tds_ctx, int srctype, const TDS_CHAR
> *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr)" function in
> convert.c
> file, the switch case goes to SYBDATETIME and lenght get value 19 (0x13).
> and the log file report the following error:
>
> inside cs_convert() error_handler: Data-conversion resulted in overflow
>
> Thanx a lot for your help...This is kind of urgent so if you have a
> solution
> or a hint, please reply asap
>
> David Nsengiyumva
>
> Software Developer
> Tel: +27 21 464 7215
> Cel: +27 73 351 3975
> 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
-
[freetds] RE: FreeTDS Digest, Vol 9, Issue 9,
David Nsengiyumva, 10/09/2003
- Re: [freetds] RE: FreeTDS Digest, Vol 9, Issue 9, Ole Hansen, 10/09/2003
-
[freetds] Re: Date/Time and Currency (was: FreeTDS Digest, Vol 9, Issue 9),
James K. Lowden, 10/10/2003
-
[freetds] Unsupported cs_con_props property CS_SERVERNAME,
Patrick Spinler, 10/15/2003
-
Re: [freetds] Unsupported cs_con_props property CS_SERVERNAME,
Michael Peppler, 10/15/2003
-
Re: [freetds] Unsupported ct_con_props property CS_SERVERNAME,
Patrick Spinler, 10/16/2003
- Re: [freetds] Unsupported ct_con_props property CS_SERVERNAME, Michael Peppler, 10/16/2003
-
Re: [freetds] Unsupported ct_con_props property CS_SERVERNAME,
Patrick Spinler, 10/16/2003
-
Re: [freetds] Unsupported cs_con_props property CS_SERVERNAME,
Michael Peppler, 10/15/2003
-
[freetds] Unsupported cs_con_props property CS_SERVERNAME,
Patrick Spinler, 10/15/2003
- <Possible follow-up(s)>
- [freetds] RE: FreeTDS Digest, Vol 9, Issue 9, David Nsengiyumva, 10/09/2003
- RE: [freetds] RE: FreeTDS Digest, Vol 9, Issue 9, Thompson, Bill D (London), 10/09/2003
Archive powered by MHonArc 2.6.24.