after executing
select a.id from atable a, btable b where a.b_id=b.id and b.some_value
= 1;
RS.get("id") fails because of RS holds full column names (a.id) and
uses full match (equalsIgnoreCase) to find column.
This is not consistent with usual JDBC behavior of other databases.
RS.get("id") should match a.id result column, and throw "id is
ambigious" in case that there is several columns with same short name.
I.e. do something like
public int findColumn(String col) throws SQLException {
checkRS();
int c = -1;
for (int i=0; i < cols.length; i++)
if (col.equalsIgnoreCase(cols[i])
|| (cols[i].endsWith(col.toUpperCase()) &&
cols[i].charAt(cols[i].length-col.length) == '.')
) if (c<0) {c=i+1} else { throw new SQLException("Ambigious
column name: '"+col+"'"); }
if (c<0) throw new SQLException("no such column: '"+col+"'");
return c;
}
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---