You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ODBC and JDBC both support the notion of escape syntax to allow users to specify a db-independent query that gets translated to native sql.
JDBC calls this [escape syntax](JDBC Spec 4.2, Chapter 13.4, LINK REDACTED, LINK REDACTED ) while ODBC calls it [escape sequence] (LINK REDACTED).
A note on JDBC: escape processing can be enabled (default) or disabled. I presume the same is valid for ODBC - @bpintea can you confirm?
The text was updated successfully, but these errors were encountered:
P.S. If ODBC doesn't disable escape processing I opt for throwing an exception in case in JDBC the escaping needs to be disabled. It is enabled by default and as far as I can see, most JDBC drivers ignore this flag like LINK REDACTED.
Further more the javadoc is ambiguous - for PreparedStatement this method does not apply rather just for Statement (namely queries without param).
All in all, throwing an exception seems like a good solution moving forward.
That's right, scanning for escape sequences is a part of ODBC and also enabled by default and also off-switchable on a per-statement basis.
AFAI can tell, the syntax seems the same across the two specs (I guess to be expected).
(On the javadoc note: I believe that once a statement is prepared - i.e. seen by the server, normally - no more escaping can or needs to be done -- maybe that's why the difference.)
Original comment by @costin:
ODBC and JDBC both support the notion of escape syntax to allow users to specify a db-independent query that gets translated to native sql.
JDBC calls this [escape syntax](JDBC Spec 4.2, Chapter 13.4, LINK REDACTED, LINK REDACTED ) while ODBC calls it [escape sequence] (LINK REDACTED).
A note on JDBC: escape processing can be enabled (default) or disabled. I presume the same is valid for ODBC - @bpintea can you confirm?
The text was updated successfully, but these errors were encountered: