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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

266<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 execute and setParam methods in the <strong>SQL</strong>PStatement class:<br />

<strong>SQL</strong>PStatement pstmt = new <strong>SQL</strong>PStatement (<br />

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

pstmt.setParam (1, 10);<br />

pstmt.setParam (2, 10);<br />

pstmt.execute ();<br />

pstmt.setParam (1, 20);<br />

pstmt.setParam (2, 20);<br />

pstmt.execute ();<br />

<strong>SQL</strong>PStatement.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 />

Throws<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, and<br />

so on.)<br />

Dh<strong>SQL</strong>Exception

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

Saved successfully!

Ooh no, something went wrong!