New answers tagged java
You can use setNull(): preparedStatement.setNull(8, Types.VARCHAR); Although I have seen drivers that do not properly support that, in that case simply try: preparedStatement.setString(8, null);
I will go by using the binary log, it only reflects the changes on data or schema and its already integrated in mysql.
The common solution is to express this as: interval '1 day' * ? with ? as a placeholder for a numeric value (possibly with a fractional part). The syntax tried in the question is rejected because for the SQL grammar, the entire expression interval '1 day' is a constant. It cannot be changed by injecting a placeholder into it, just like we couldn't write ...
You can enable trace for you session after application is connected, for example, EXEC DBMS_MONITOR.session_trace_enable(binds=>TRUE);, then you will find the culprit in trace file. More information about tracing in Oracle https://oracle-base.com/articles/misc/sql-trace-10046-trcsess-and-tkprof
Either set tracing on client(jdbc) side. Or you can create system trigger ON SYSTEMERROR see this, but this requires DBA privs.
Looking at the java api (http://docs.oracle.com/javase/7/docs/api/) It would look to me that the exeption which is beeing thrown comes from the database. From the Java API SQLException Constructors section SQLException() Constructs a SQLException object. SQLException(String reason) Constructs a SQLException object with a given reason. ...
Two different things probably: Syntax is checked in MySQL server. There may be connectors/client libraries which would do the parsing and checking before sending it, but it would only mean doing the same work twice. MySQL server receives query as string and then processes it. Even for prepared statements server receives statement as text and compiles it. ...
Apparently, the JDBC driver needs to be loaded before the connection is made by Class.forName("com.orientechnologies.orient.jdbc.OrientJdbcDriver").
Top 50 recent answers are included