Re: maxlength of CS_TEXT_TYPE - 2GB?

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
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
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.