I am confounded in having the following PSQLException error everytime I SUCCESSFULLY (note: i.e., successfully) attempt to programmatically insert set of values onto a table using PostgreSQL's JDBC. In my attempt to look for the root cause, I arrived at the rather too simple an SQL INSERT statement as below which still fails to point on the underlying problem:
INSERT INTO "PUBLIC"."tblJOB_PROFILE" ( "ccJOBPROFILE_NO" ) VALUES ( '05-0038' );
org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
I even actually tried to run that straight in PGAdmin III's Query tool to test it out. It works perfectly fine there.
Where do I go wrong programmatically? =D Here's a snippet of my code:
sIns = "INSERT INTO \"PUBLIC\".\"tblJOB_PROFILE\" " +
" ( \"ccJOBPROFILE_NO\" )" +
" VALUES ( '" + lblJobProfileCode.getText() + "' );";
int iRowCount = pStm.executeUpdate(sIns);
rs.insertRow();
- - - - -
I am using PostgreSQL ver8.0 and pg74.215.jdbc3.jar
Many many thanks in advance if you can enlighten me on this.
INSERT INTO "PUBLIC"."tblJOB_PROFILE" ( "ccJOBPROFILE_NO" ) VALUES ( '05-0038' );
org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
I even actually tried to run that straight in PGAdmin III's Query tool to test it out. It works perfectly fine there.
Where do I go wrong programmatically? =D Here's a snippet of my code:
sIns = "INSERT INTO \"PUBLIC\".\"tblJOB_PROFILE\" " +
" ( \"ccJOBPROFILE_NO\" )" +
" VALUES ( '" + lblJobProfileCode.getText() + "' );";
int iRowCount = pStm.executeUpdate(sIns);
rs.insertRow();
- - - - -
I am using PostgreSQL ver8.0 and pg74.215.jdbc3.jar
Many many thanks in advance if you can enlighten me on this.