Home All Groups Group Topic Archive Search About

Text DataType and XML Explicit in SqlServer 2005

Author
19 Oct 2006 4:22 PM
Rajesh Patel
Hi,

I have a table with an id column and text data type column. My
following query runs fine on Sqlserver 2000, but in SqlServer 2005, It
gives me an error

"Invalid character value for cast specification". Does anybody have
idea?

table contains 2 columns

id int identity(1, 1)
textcol text                   -- contains XML.

The query is


Select
    1     as tag,
    null     as parent,
    textcol as [textcol!1!!cdata]
>From table1
Where id = @id
For XML Explicit


The query I am running from VB6 application. I am receiving result back
through ADO stream object.

Is there anything change in XML Explicit implementation causing this
problem?

We are doing migration from Sqlserver 2000 to 2005. I am not looking
for any suggestion to change text data type to XML data type.


Thanks
Rajesh

AddThis Social Bookmark Button