Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

procedure java

public static void testProc(int iParam1, String iParam2, int [] oParam)
        throws SQLException {
    String connectionURL = "jdbc:default:connection";
    Connection conn = DriverManager.getConnection(connectionURL);
    String DML = "UPDATE TEST_TABLE SET NAME = ? WHERE ID = ?";
    PreparedStatement pstmnt = conn.prepareStatement(DML);
    pstmnt.setString(1, iParam2);
    pstmnt.setInt(2, iParam1);
    int updateRowcount = pstmnt.executeUpdate();
    oParam [0] = updateRowcount;
} // testProc()
Source by www.javacodegeeks.com #
 
PREVIOUS NEXT
Tagged: #procedure #java
ADD COMMENT
Topic
Name
9+2 =