pc:RdbmsQuery

Previous Next

Performs an SQL query directly against the RDBMS, bypassing the USoft Rules Engine.

Use this command only if you have special reasons to bypass the USoft Rules Engine. Otherwise, prefer pc:SqlStatement.

Syntax

<pc:RdbmsQuery 
    rdbms="rdbms"
    connectstr="connectstr"
    database="database"
    user="user"
    pwd="pwd"
    statement="rdbms-query" >
</pc:RdbmsStatement>

The required rdbms and connectstr identify the database connection through which you want to access the data.

The required user and pwd identify the username/password combination needed to access the database table(s) that you want to query.

The required statement is the query statement. Its syntax must be supported by the RDBMS platform that you are using.

On Oracle, database is optional and may be used to identify the table owner if this owner is distinct from owner.

On SQL Server, database is required and identifies the database in the SQL Server instance where the table(s) reside.

 

Example

<pc:RdbmsQuery
   connectstr="  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = L3100100247.usoft.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )"
   rdbms="oracle"
   database="USD91_TRAVEL2"
   user="USD91_TRAVEL2"
   pwd="USD91_TRAVEL2"
   statement="SELECT MAX_AGE FROM TOUR"
/>

Return value

The return value of the Example could look like this:

<Records>
  <Record MAX_AGE="" />
  <Record MAX_AGE="65" />
  <Record MAX_AGE="65" />
  <Record MAX_AGE="80" />
</Records>

 

See also

pc:SqlStatement

pc:RdbmsStatement