Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL Tag Library.

Similar presentations


Presentation on theme: "SQL Tag Library."— Presentation transcript:

1 SQL Tag Library

2 SQL TL Sql tag library depends on data sources to obtain connections.
(1) Getting a database connection (2) Accessing a database. <sql:………./> Tags available in SQL Tag Library (1) setDataSource (2) query, dateParam, param, transaction, update

3 <sql :setDataSource>
-allows an application to connect to a database. <sql:setDataSource url=“ ” driver=“ ” user=“ ” password=“” var=“ ” Scope=“”/>

4 <sql:query> Syntax: <sql:query dataSource=“” sql=“”
startRow=“” maxRows=“” var=“” Scope=“” />

5 <sql:update> <sql:update dataSource=“” sql=“” var=“” Scope=“”
/>

6 SQL Tags (Transaction Handling)
<sql:transaction dataSource=“” isolation=“read_committed” / ”read_uncommitted” / “repeatable_read” / “serializable” > <sql:query> or <sql:update> statements </sql:transaction>

7 <sql : param> <sql :param value= “value” />

8 <sql : transaction datasource = “${datasource}”> <sql : update> UPDATE acc SET bal = bal - ? WHERE accno = ? <sql : param value = “${transferamt}” /> <sql : param value = “${accFrom}” /> </sql : update> sql : update> </sql :transaction>


Download ppt "SQL Tag Library."

Similar presentations


Ads by Google