You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using updateable resultsets the release notes indicate that you can update only simple queries containing either all fields forming a unique key (primary key) or rdb$db_key. However, the later does not work. I had to include the primary key instead of rdb$db_key to make the queries work.
Sample:
Statement statement = connection.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE );
ResultSet data = statement.executeQuery( "select rdb$db_key, value from
some$table" );
while ( data.next() ) {
data.updateInt( 2, f(data.getInt( 2 ) ) );
data.updateRow();
}
data.close();
statement.close();
Submitted by: Steffen Heil (firebirdsql.org_partner.sh-solutions.de)
Assigned to: Roman Rokytskyy (rrokytskyy)
When using updateable resultsets the release notes indicate that you can update only simple queries containing either all fields forming a unique key (primary key) or rdb$db_key. However, the later does not work. I had to include the primary key instead of rdb$db_key to make the queries work.
Sample:
Statement statement = connection.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE );
ResultSet data = statement.executeQuery( "select rdb$db_key, value from
some$table" );
while ( data.next() ) {
data.updateInt( 2, f(data.getInt( 2 ) ) );
data.updateRow();
}
data.close();
statement.close();
Commits: f673436
The text was updated successfully, but these errors were encountered: