Re: maxlength of CS_TEXT_TYPE - 2GB?

Erik Bryn <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
When setting up binds, I'm not aware how it would be possible to know
the length of the data yet to have been fetched. AFAIK, from the
examples I've seen, you need to use the CS_DATAFMT information
provided by ct_describe.

Since my initial email, I've found the cs_get_data function, but it's
limitations of being used only on unbound columns, which cannot be
proceeded by bound columns pretty much eliminates it as an option.

Thanks for the help,
- Erik

On Sun, Aug 22, 2010 at 6:31 AM, Frediano Ziglio <[email protected]> wrote:
> Il giorno 22/ago/2010, alle ore 07.59, Erik Bryn <[email protected]> ha
> scritto:
>
>> Hi,
>>
>> I'm new to interfacing with FreeTDS in C. While attempting to fetch
>> text, using ct-lib, from MSSQL 2008. I'm seeing the maxlength of the
>> field is 2GB, which is obviously too large to malloc. What's the best
>> practice for reading in data of unknown length?
>>
>> Thanks,
>> - Erik
>
> Well, use lenght instead of maxlenght and allocate as long as you need
>
> Freddy77
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.