jcs.xml.resultset
Class DoSql2Xml

java.lang.Object
  |
  +--jcs.xml.resultset.DoSql2Xml

public class DoSql2Xml
extends java.lang.Object

A client command line interpreter to invoke the ResultSetXml class.

This command line interpreter invokes the ResultSetXml constructor that evaluates an SQL query and translates the result set to an XML document.

The ResultSetXml class can be invoked in either a client or server environment. This class DoSql2Xml invokes the class constructor in a client environment, using a client file for the results.


Method Summary
static void main(java.lang.String[] args)
          Invokes the query2Xml method from a client command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
Invokes the query2Xml method from a client command line.

Usage:

  java jcs.resultset.DoSql2Xml -Q query [-C cdataColumns] 
       [-N columnNameOption]  -O output-file-name  -S server 
  

Example command line:

 
  java jcsexec.DoSql2Xml -Q "select d.name, e.name, d.dno       \
       from emps e, dept d  where e.dno = d.dno order by d.name, e.name"  \
       -C  "000" -N "yes" -S "antibes:4000?user=sa"  -O emp-dept.xml
  

This call will evaluate the query (-Q), generate an XML result set with the query's metadata and data, and store the XML document in file emp-dept.xml.

The parameters tags are as follows. For a detailed description of the query, cdataColumns, columnNamesOption, and server parameters, see the jcs.resultset.resultSetXml constructor, which this command-line routine invokes. For a description of the server parameter, see the method jcs.util.ExecSql.connectTo.

Parameters:
args - a string array with the command line arguments