You can insert an @OP parameter into the SQL query of a database. This dynamically modifies the query string submitted to the database.
Inserting @OP parameters
Create a new database element:
Right-click the mouse in the Application Manager detail view and select New Aggregated Application from the pop-up.
Click the down arrow beside the New icon on the Application Manager toolbar and select Aggregated Application from the drop-down menu.
When the Application Builder appears, right-click in either frame and select New Database Element from the pop-up. You can also click the down arrow next to the Add icon and select Database Element.
Complete the Database Element Definition:
This example uses an Adaptive Server database Enterprise.
Username – enter the user name to access the database; for example:
sa
Password – enter the password to access the database. Leave this field blank for this example.
JDBC Connect URL – enter the connection string to access the database; for example:
jdbc:sybase:Tds:<ASE_server_name>:5000
JDBC Driver – enter the JDBC driver used to access the database; for example:
com.sybase.jdbc2.jdbc.SybDriver
SQL Query String – enter the SQL statement to retrieve the requested data from the database; for example:
select * from tiles where header like '@OP["Header"="%CNN%"]'
To determine other header values, use a wildcard search ‘%’.
UI XSLT – enter the complete URL of the XSLT to be applied to the content returned by the database or click Select to select from existing XSL templates.
Select the Variable option next to the Header parameter
and enter “%CNN%
'” into
the Default Value input field.
Click Next in the upper-right corner.
Enter an element name such as “DB Search” and click Finish.
In the Application Builder, click Save to display the Application Save window.
Complete the fields and click OK.
Click Finish in the upper-right corner. You should see a pop-up that displays “Application saved successfully.”
Click OK to close the window, then click Close in the upper-right corner.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |