HPlogo HP Driver for JDBC User's Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 ALLBASE/SQL Specifics

Dynamic/Parameterized SQL Statements

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The HP Driver for JDBC supports the use of parameterized SQL statements through the java.sql.PreparedStatement interface. The SQL statements must use a question mark (?) as the marker character for passing the parameters.

For example, a SELECT statement with parameters in the where clause would look like:

SELECT NAME, ADDRESS FROM ADDRBOOK WHERE NAME=?

Another example is an INSERT statement:

INSERT INTO ADDRBOOK(NAME, ADDRESS) VALUES (?,?)

Feedback to webmaster