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
Never use plain statements with substitution. Use preparedStatement instead [ Read: When should we use a PreparedStatement instead of a Statement? ]
String sql = "insert into MYTABLE_TRANSACTIONS (ACCOUNT_ID,TRANSACTION_TYPE,AMOUNT) values (?, ?, ?)";
PreparedStatement pstmt = connection.prepareStatement(sql);
pstmt.setString(1, name );
pstmt.setString(2, action );
pstmt.setDouble(3, amount);
pstmt.executeUpdate();