I have moved over some data from 2000 to SQL 2005. The data is the
same, but now some existing working code is not working with the
BinaryWrite method of Response.BinaryWrite in an ASP page.
In a field in a table that is ntext. It contains HTML data tags. ie.
<P><B>this is</b> etc... etc.. </P>
Before moving to 2005 the following classic ASP code worked (recordset
setup correctly):
dim mFieldSize, mBytes
mFieldSize = rs.Fields("keywords").ActualSize
mBytes = rs.Fields("keywords").GetChunk(mFieldSize)
Response.BinaryWrite mBytes
now with the data in 2005 I get this error:
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another. Is this a coding error, or a type error
problem that I have to do differently with 2005?
If anyone knows of the solution to this problem please let me know.
Thanks
*** Sent via Developersdex http://www.codecomments.com ***Have you tried Response.Write instead of Response.BinaryWrite? It might be
that SQL 2005 is returning a variant datatype family of Unicode rather than
binary because the underlying data is Unicode (ntext).
Hope this helps.
Dan Guzman
SQL Server MVP
"E L" <smakawhat@.yahoo.com> wrote in message
news:uoLwI110GHA.1268@.TK2MSFTNGP02.phx.gbl...
>I have moved over some data from 2000 to SQL 2005. The data is the
> same, but now some existing working code is not working with the
> BinaryWrite method of Response.BinaryWrite in an ASP page.
> In a field in a table that is ntext. It contains HTML data tags. ie.
> <P><B>this is</b> etc... etc.. </P>
> Before moving to 2005 the following classic ASP code worked (recordset
> setup correctly):
> dim mFieldSize, mBytes
> mFieldSize = rs.Fields("keywords").ActualSize
> mBytes = rs.Fields("keywords").GetChunk(mFieldSize)
> Response.BinaryWrite mBytes
> now with the data in 2005 I get this error:
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another. Is this a coding error, or a type error
> problem that I have to do differently with 2005?
> If anyone knows of the solution to this problem please let me know.
> Thanks
> *** Sent via Developersdex http://www.codecomments.com ***
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment