23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Java Class <strong>Reference</strong><br />

262<br />

Format<br />

Returns<br />

public void execute()<br />

None<br />

Parameters<br />

None<br />

Throws<br />

Dh<strong>SQL</strong>Exception<br />

Example This code fragment illustrates the setParam and execute methods:<br />

CREATE PROCEDURE insert_customer (<br />

IN cust_number INTEGER,<br />

IN cust_name CHAR(20)<br />

)<br />

BEGIN<br />

<strong>SQL</strong>IStatement insert_cust = new <strong>SQL</strong>IStatement (<br />

"INSERT INTO customer VALUES (?,?) ");<br />

insert_cust.setParam (1, cust_number);<br />

insert_cust.setParam (2, cust_name);<br />

insert_cust.execute ();<br />

END<br />

<strong>SQL</strong>IStatement.makeNULL<br />

Sets the value of an <strong>SQL</strong> statement’s input parameter to NULL. This method is common to the<br />

<strong>SQL</strong>Cursor, <strong>SQL</strong>IStatement, and <strong>SQL</strong>PStatement classes. This method is redundant with using<br />

the setParam method to set an <strong>SQL</strong> statement’s input parameter to NULL.<br />

Format<br />

Returns<br />

public void makeNULL(int f)<br />

None<br />

Parameters<br />

f<br />

An integer that specifies which input parameter of the <strong>SQL</strong> statement string to set to<br />

NULL. 1 denotes the first input parameter in the statement, 2 denotes the second, n<br />

denotes the nth.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!