SQLiteJava
AmnoJeeuw
amnojeeuw at gmail.com
Thu Sep 6 22:21:33 UTC 2018
I have a database table named company that looks like this:
snapshot2
When the application is asked to change the value of ArbolOne to ArbolOn,
db_snapshot1
the application generates the following schema represented on this
message box:
db_snapshot3
which produces this Exception error:
db_snapshot4
I am attaching a snip of the code, in case you'd like to know it.
Having said that, I'd like to know if this is a bug or if I have not
understand the information found in here
<https://www.tutorialspoint.com/jdbc/jdbc-update-records.htm>.
Any help would be much appreciated.
--
ArbolOne
Using Fire Fox and Thunderbird.
Developing using Java, C/C++, HTM/CSS and JS as our platform has been exciting and most rewarding.
[ Sí ]
-------------- next part --------------
public class ToDataBase extends CenizaDatabaseManager {
/**
* Update a record from the database
* ......
*/
public void updateRecord(ArrayList<StringDataIntegrityVerification> relation)
throws SQLException {
@SuppressWarnings("unused")
MessageBox mb = new MessageBox();
try {
this.schema.delete(0, schema.length());
this.schema.append("UPDATE ");
this.schema.append(relation.get(2).toString()); // Table name
this.schema.append(" SET ");
this.schema.append(relation.get(3).toString()); // Column name
this.schema.append("=");
this.schema.append(relation.get(4)); // new data
this.schema.append(", ");
this.schema.append("WHERE id ");
this.schema.append(relation.get(1).toString()); // Primary Key
mb.Show("Debugging", "ToDataBase.updateRecord(...)", schema.toString());
System.out.println("and the \'schema\' is " + schema);
this.stmt.executeUpdate(this.schema.toString()); //<-- Exception ??
} catch (final /*SQL*/Exception e) {
mb.Show("Debugging", "Error message: " + e.getMessage());
}
}
}// End of Class
More information about the openjfx-dev
mailing list