executeInsert

Description

Executes an INSERT statement within the CUBRIDPreparedStatement object and returns the CUBRIDOID corresponding to the inserted object.

Syntax

CUBRIDOID executeInsert()

Return Value
Example

String sql  = "insert into testtable(a) values(?)";

 

CUBRIDPreparedStatement pstmt = (CUBRIDPreparedStatement)

                                con.prepareStatement(sql);

pstmt.setString(1, "CUBRID");

CUBRIDOID oid = pstmt.executeInsert();