[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    [freetds] Re: reads past end of field for Text data type.
From:       Daniel Lynes <dlynes1 () home ! com>
Date:       2001-01-31 19:08:37
[Download RAW message or body]

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.

---
You are currently subscribed to freetds as: [freetds@progressive-comp.com]
To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic