How to read Strings bigger than 255 chars
James K. Lowden
jklowden at speakeasy.org
Sun Jun 3 15:18:31 EDT 2001
Paul Schaap wrote:
> > I saw that freeTDS cannot read Strings from the (SQLServer7)database with
> > a length bigger than 255. freeTDS simply cuts the String.
> > This happens with datatypes char, varchar, nvarchar, nchar. Any Ideas?
>
> Cast them as type "TEXT".
>
> P.S. the FAQ is confused/ing here !
Confused, methinks.
Are you referring to http://216.254.83.209/freetds/html/x515.htm?
"The best current solution is convert long strings to varchar(8000) in your query
text with CAST( variable_name as varchar(2000) ) as variable_name."
Not so? Should that read "CAST(variable_name as text) as variable_name"? Or does it
depend on what client-server-version combination you're using? Tell the truth,
please. No point in updating one lie with another.
You see, if the fellow who wrote the documentation actually knew what he was talking
about, this sort of silliness wouldn't happen. Other kinds of silliness, maybe, but
not this kind.
Thanks, Paul.
--jkl
More information about the FreeTDS
mailing list