Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Cast Clob to VarChar
Mon, Feb 11 2008 5:37 AMPermanent Link

Robin Joseph
Tim

I am attempting to cast a CLOB column in a table to a VarChar using :-
Select CAST (Col1 as VarChar(500)) from Table1

When I display the column in a console window or a textbox as .GetString() or .AsString()
the data is displayed as Unicode Hex characters rather than text.
eg '43-00-4C-00-4F-00-42-00' rather than 'CLOB'

I don't know if it is significant, but I enter the data in ElevateDB Manger (Unicode) then
read it back out from a C# program.

Using VS2008, EDB 1.07 B3

Regards

Robin Joseph
Mon, Feb 11 2008 3:16 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Robin,

<< I am attempting to cast a CLOB column in a table to a VarChar using :-
Select CAST (Col1 as VarChar(500)) from Table1

When I display the column in a console window or a textbox as .GetString()
or .AsString() the data is displayed as Unicode Hex characters rather than
text. eg '43-00-4C-00-4F-00-42-00' rather than 'CLOB' >>

This is also a bug, and will be fixed in the 1.08 release coming out today
(I caught it when viewing table descriptions in the property grid for the
Server Explorer).  My apologies for the delays in getting this out, we had a
couple of VS2008 design-time kinks that needed working out with Microsoft
before the release could go out.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image