I was hoping to have some assistance in understanding this error. I am making a simple connection to a database, and for some reason it doesn\'t like my input, but I am failing
The problem comes from the makeDeposit()
method, specifically from these lines:
String sql = "insert into MYTABLE_TRANSACTIONS (ACCOUNT_ID,TRANSACTION_TYPE,AMOUNT) values (name, action, amount)";
stmt.executeUpdate(sql);
Those values aren't right, you probably want some variable named name
, not the actual string name.
To provide a bit more insight, the error is a list of the methods that were ran until the error occurred. The one at the top is the most recent. So everything starts from the main()
method, which runs the makeDeposit()
method and then some methods that follow the call of stmt.executeUpdated(sql)
. Hope that clears it up.