Plands.com Logo  Business Internet Services 
Main Menu
Home
Planetary CRM
  Benefits
  Features
  Demo
E-Mail Services
  E-mail Hosting
  Newsletters
  Discussion Lists
Web Hosting
Server Co-location
and Administration
Web Applications
Technical Support
Contact Us
DXP Samples
 
DxpHome  ||   Samples  ||   Details  ||   Docs  ||   Trees  ||   xml-xsl  ||   Links
// DbStmtX.java

The DbStmtX node executes an SqlStmt using a database Connection and stores the result as an XmlRecordSet object.

Here is and example that uses an SqlStmt to provide the query:

  
<dxp:DbStmtX action="query" dbcon="member" store="xrecord">
   <dxp:SqlStmt>
      <dxp:Cp name="sql">select from member where lastname='?' and company='?'</dxp:Cp>
      <dxp:SqlParam name="lastname" type="CHAR" require="true"/>
      <dxp:SqlParam name="company" type="CHAR" require="true"/>
   </dxp:SqlStmt>
</dxp:DbStmtX>

The action attribute specifies what action to take. Currently suppported: query - store results of a query back in the request as an XmlRecordSet getFirstRow - store first record returned by a query as XmlRecordSet

The dbcon attribute specifies the name of a DbPool to get a connection from. DbPools are managed by the DbManager which is stored in the ServletContext.


@see com.plands.dbutil.DbManager. The dbcon attribute can also specify that the DbStmtX should obtain the connection from a parent DbStmtX tag rather than getting the connection itself. If the value of the dbcon attibute is 'DbStmtX' the DbStmtX will attempt to get a connection from a DbStmtX tag that encloses it.


@author Mark Ashworth
@version 0.1, 2001-09-05

Return to Index

Note: We have tried to test all of the code examples but they may contain errors. Any questions, comments, suggestions, or problems should be sent to info@plands.com.