[CONJ-507] hi want to insert data to an table with prepared statement, but its talking about syntax error Created: 2017-07-19 Updated: 2017-07-19 Resolved: 2017-07-19 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | question |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | cyborg | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MariaDB 10.0.30 |
||
| Description |
|
The Error: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?)' " |
| Comments |
| Comment by Diego Dupin [ 2017-07-19 ] |
|
executeUpdate(sql) is inherit from Statement (see javadoc). This really execute the sql in parametre so "insert into task (description) values Just replace "executeUpdate(query);" by "executeUpdate();" |
| Comment by cyborg [ 2017-07-19 ] |
|
awesome! |