![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using the jConnect5.5 JDBC driver and I have run into an issue with quoted identifiers. It seems that quoted identifiers are turned on and I don't see anything in the API to turn them off. For example, String query = "select a, b, c, \"xxx\" from sqlclass..sort1"; ResultSet rs = stmt.executeQuery(query); I receive the following error: com.sybase.jdbc.SybSQLException: Invalid column name 'xxx'. at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Exception.java:42) at java.sql.SQLException.<init>(SQLException.java:43) If I use single quotes or set quoted_identifier off...it works fine. The query above works fine in isql without changing the quoted identifier setting. Any ideas? |
#3
| |||
| |||
|
|
Ci-Ci Mills wrote: I am using the jConnect5.5 JDBC driver and I have run into an issue with quoted identifiers. It seems that quoted identifiers are turned on and I don't see anything in the API to turn them off. For example, String query = "select a, b, c, \"xxx\" from sqlclass..sort1"; ResultSet rs = stmt.executeQuery(query); I receive the following error: com.sybase.jdbc.SybSQLException: Invalid column name 'xxx'. at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Exception.java:42) at java.sql.SQLException.<init>(SQLException.java:43) If I use single quotes or set quoted_identifier off...it works fine. The query above works fine in isql without changing the quoted identifier setting. Any ideas? Two things: 1 - You found the API that sets this behavior, in simply sending the T-SQL "set quoted_identifier off" via a statement. 2 - What happens in isql if you explicitly turn on quoted identifiers first? The issue may just be that isal starts up with a different default than isql, and in either case, you can send SQL to change the connection behavior. Joe Weinstein at BEA |
![]() |
| Thread Tools | |
| Display Modes | |
| |