VO2ADO : XML field (SQL Server)

This is a discussion on VO2ADO : XML field (SQL Server) within the Clipper forums in Programming Languages category; Hi Everyone, Using Vo2Ado with VO2.8, I need to get the contents of an XML field in SQL Server 2005 as a string. Here is the Select : SELECT myfield.query('*') AS xmlfield FROM mytable This Select is working : I use it in a DB Tool (DBVisualizer) and the tool show me automatically the data of the field as a string but when I execute this Select in VO, I cannot get the data as a string. I tried to cast in varchar (SELECT CAST(myfield.query('*') AS VARCHAR) AS xmlfield FROM mytable) but I get the following error : Target string ...

Go Back   Application Development Forum > Programming Languages > Clipper

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-26-2008, 11:38 AM
Phil Mermod
Guest
 
Default VO2ADO : XML field (SQL Server)

Hi Everyone,

Using Vo2Ado with VO2.8, I need to get the contents of an XML
field in SQL Server 2005 as a string.

Here is the Select : SELECT myfield.query('*') AS xmlfield FROM
mytable

This Select is working : I use it in a DB Tool (DBVisualizer)
and the tool show me automatically the data of the field as a
string but when I execute this Select in VO, I cannot get the
data as a string.

I tried to cast in varchar (SELECT CAST(myfield.query('*') AS
VARCHAR) AS xmlfield FROM mytable) but I get the following error
: Target string size is too small to represent the XML instance

Any help will be very appreciated.

Cheers,

--
Phil Mermod
Crystal Reports Library for Visual Objects
http://www.pkl.ch/dev/
Reply With Quote
  #2  
Old 08-26-2008, 05:43 PM
Robert van der Hulst
Guest
 
Default Re: VO2ADO : XML field (SQL Server)

Hi Phil,
On 26 Aug 2008, at 15:38:45 [GMT GMT] (which was 17:38 where I live)
you wrote about: 'VO2ADO : XML field (SQL Server)'

> Using Vo2Ado with VO2.8, I need to get the contents of an XML
> field in SQL Server 2005 as a string.


> Here is the Select : SELECT myfield.query('*') AS xmlfield FROM
> mytable


> This Select is working : I use it in a DB Tool (DBVisualizer)
> and the tool show me automatically the data of the field as a
> string but when I execute this Select in VO, I cannot get the
> data as a string.


> I tried to cast in varchar (SELECT CAST(myfield.query('*') AS
> VARCHAR) AS xmlfield FROM mytable) but I get the following error
> : Target string size is too small to represent the XML instance


> Any help will be very appreciated.


XML Data is usually retrieved through an AdoStream object.

Look at: http://www.extremeexperts.com/SQL/Ar...ithSQLXML.aspx

and http://microsoft.apress.com/asptoday...2000-using-ado

and http://www.alleged.org.uk/pdc/2003/10/08.html




--
Robert van der Hulst
AKA Mr. Data
Vo2Jet & Vo2Ado Support
VO & Vulcan.NET Development Team
www.heliks.nl

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:37 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.