dbTalk Databases Forums  

Obtaining Query Results as XML

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Obtaining Query Results as XML in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jacob Berlin
 
Posts: n/a

Default Obtaining Query Results as XML - 12-08-2003 , 01:30 PM






I am using ASA 9 and iSQL 9. I am following the
instructions on how to obtain query results as xml (the
on-line help) using syntax like this:

select column_names from table_name for xml

When I run this query I get error messages because of the
for xml. What am I doing wrong? Any suggestions?

Thanks in advance.

Jake Berlin

Reply With Quote
  #2  
Old   
Chris Keating \(iAnywhere Solutions\)
 
Posts: n/a

Default Re: Obtaining Query Results as XML - 12-08-2003 , 01:35 PM






You have to specify which xml-mode to use. See the documentation for more
details.

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

************************************************** **************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

************************************************** **************************
*

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

************************************************** **************************
*

<Jacob Berlin> wrote

Quote:
I am using ASA 9 and iSQL 9. I am following the
instructions on how to obtain query results as xml (the
on-line help) using syntax like this:

select column_names from table_name for xml

When I run this query I get error messages because of the
for xml. What am I doing wrong? Any suggestions?

Thanks in advance.

Jake Berlin



Reply With Quote
  #3  
Old   
Reg Domaratzki
 
Posts: n/a

Default Re: Obtaining Query Results as XML - 12-08-2003 , 01:38 PM



You need to specify RAW, AUTO or EXPLICIT mode when viewing results as XML.
See the following section of the docs :

ASA SQL User's Guide
Using XML in the Database
Obtaining query results as XML
Using the FOR XML clause to retrieve query results as XML

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

<Jacob Berlin> wrote

Quote:
I am using ASA 9 and iSQL 9. I am following the
instructions on how to obtain query results as xml (the
on-line help) using syntax like this:

select column_names from table_name for xml

When I run this query I get error messages because of the
for xml. What am I doing wrong? Any suggestions?

Thanks in advance.

Jake Berlin



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.