Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18525
Modified Files:
ContentsTab.java
Log Message:
bug fix on insert - do not use pseudo-columns in insert
Index: ContentsTab.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table/ContentsTab.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** ContentsTab.java 26 Apr 2004 15:45:38 -0000 1.26
--- ContentsTab.java 27 Apr 2004 15:02:05 -0000 1.27
***************
*** 1010,1015 ****
// add a variable position for each of the columns
! for (int i=0; i<colDefs.length; i++)
! buf.append(" ?,");
// replace the last "," with ")"
--- 1010,1017 ----
// add a variable position for each of the columns
! for (int i=0; i<colDefs.length; i++) {
! if (i != _rowIDcol)
! buf.append(" ?,");
! }
// replace the last "," with ")"
***************
*** 1023,1028 ****
// into the appropriate variable position in the prepared stmt
for (int i=0; i<colDefs.length; i++) {
! CellComponentFactory.setPreparedStatementValue(
! colDefs[i], pstmt, values[i], i+1);
}
count = pstmt.executeUpdate();
--- 1025,1032 ----
// into the appropriate variable position in the prepared stmt
for (int i=0; i<colDefs.length; i++) {
! if (i != _rowIDcol) {
! CellComponentFactory.setPreparedStatementValue(
! colDefs[i], pstmt, values[i], i+1);
! }
}
count = pstmt.executeUpdate();
|