freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Daniel Lynes <dlynes1 AT home.com>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: reads past end of field for Text data type.
- Date: Wed, 31 Jan 2001 11:08:37 -0800
On Tuesday 30 January 2001 01:53, you wrote:
> i'm building a python module on top of dblib to access a sql 7 box. for
> the most part it works great.
>
> my only problem is with text fields. i'm trying to access large text
> fields (30k+). this works fine except that i get strange characters
> stuck to the end of some of text fields. this happens when i select
> multiple rows. the extra characters appear to be from the row before the
> one with extra characters.
This might sound obvious, and you might have already thought of it, but you
might not be reinitializing the buffer to store the data, from one row to the
next. So, if the previous line was larger than the current line, you might
get garbage at the end of it, that appears to be from the previous line.
> i'm using the dblib function 'dbdata' and reading from the address
> returned to the end of the string. the end of the string does not appear
> to be in the correct place.
> Any help would be greatly appreciated.
> Thanks
Perhaps 'dbdata' doesn't null-terminate its data, and you're expecting it to.
Just a thought.
-
reads past end of field for Text data type.,
mat, 01/30/2001
- <Possible follow-up(s)>
- Re: reads past end of field for Text data type., mat, 01/30/2001
- Re: reads past end of field for Text data type., Daniel Lynes, 01/31/2001
Archive powered by MHonArc 2.6.24.