ORA-00928 missing SELECT keyword in Oracle
single quotes are for string literals not for identifiers only so you should remove it around the columnNames.
INSERT INTO offer1 (RCODE,OFFERNO,DAT) VALUES (?,?,?)
and use executeUpdate
since you are not retrieving records which results a resultset.
from DOCS
boolean execute()
- Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.
ResultSet executeQuery()
- Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
int executeUpdate()
- Executes the SQL statement in this PreparedStatement object, which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement.
Without the single quotes, try
String query="insert into offer1(RCODE,OFFERNO,DAT) values(?,?,?)";
Please try this
String query="insert into offer1(RCODE,OFFERNO,DAT) values(?,?,?)";