Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv27636/app/src/net/sourceforge/squirrel_sql/client/session
Modified Files:
DataSetUpdateableTableModelImpl.java
Log Message:
Bug-2818117 ("Make Editable" uses column label instead of name): replaced the use of getLabel (rsmd.getColumnLabel()) with getColumnName (rsmd.getColumnName()).
Index: DataSetUpdateableTableModelImpl.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/DataSetUpdateableTableModelImpl.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** DataSetUpdateableTableModelImpl.java 18 May 2008 13:03:26 -0000 1.17
--- DataSetUpdateableTableModelImpl.java 31 Jan 2010 22:44:32 -0000 1.18
***************
*** 388,392 ****
final Statement stmt = conn.createStatement();
final String queryString =
! "SELECT " + colDefs[col].getLabel() +" FROM "+ti.getQualifiedName() +
whereClause;
--- 388,392 ----
final Statement stmt = conn.createStatement();
final String queryString =
! "SELECT " + colDefs[col].getColumnName() +" FROM "+ti.getQualifiedName() +
whereClause;
***************
*** 467,471 ****
final String sql = constructUpdateSql(
! ti.getQualifiedName(), colDefs[col].getLabel(), whereClause);
if (s_log.isDebugEnabled()) {
--- 467,471 ----
final String sql = constructUpdateSql(
! ti.getQualifiedName(), colDefs[col].getColumnName(), whereClause);
if (s_log.isDebugEnabled()) {
***************
*** 590,594 ****
// If this name is NOT in the list, then skip it; otherwise we fall through
// and use the column in the WHERE clause
! if (colNames.get(colDefs[i].getLabel()) == null)
continue; // go on to the next item
}
--- 590,594 ----
// If this name is NOT in the list, then skip it; otherwise we fall through
// and use the column in the WHERE clause
! if (colNames.get(colDefs[i].getColumnName()) == null)
continue; // go on to the next item
}
***************
*** 791,795 ****
if (defValue != null && defValue.length() > 0) {
// find the entry in colDefs matching this column
! if (colDefs[expectedColDefIndex].getLabel().equals(colName)) {
// DB cols are in same order as colDefs
defaultValues[expectedColDefIndex] = defValue;
--- 791,795 ----
if (defValue != null && defValue.length() > 0) {
// find the entry in colDefs matching this column
! if (colDefs[expectedColDefIndex].getColumnName().equals(colName)) {
// DB cols are in same order as colDefs
defaultValues[expectedColDefIndex] = defValue;
***************
*** 801,805 ****
// because most tables do not have huge numbers of columns.
for (int i=0; i<colDefs.length; i++) {
! if (colDefs[i].getLabel().equals(colName)) {
defaultValues[i] = defValue;
break;
--- 801,805 ----
// because most tables do not have huge numbers of columns.
for (int i=0; i<colDefs.length; i++) {
! if (colDefs[i].getColumnName().equals(colName)) {
defaultValues[i] = defValue;
break;
|