SET QUOTED IDENTIFIER in JDBC connection string

  • I have an app that connects to a SQL 2005 database with JDBC. I have added some indexed views in the database to improve performance. But inserts fail because SET QUOTED_IDENTIFIER is OFF. I would like to set that parameter ON in the app connection string but I can't find the JDBC syntax for that.

    Does anyone know how to set that parm to ON in a JDBC connection string? thanks!

  • in connections container there is a function called createStatement().

    Use it to issue SET QUOTED_IDENTIFIER ON

    Alex S
  • Thanks for the reply. I talked to one of our developers about that. She thinks your suggestion would work in code but I was looking for something that goes in the connection string, like QuotedId=Yes in an ODBC connection string.

    But it turns out the connection string idea might not work because a lot of the vendor's stored procs are coded with SET QUOTED_IDENTIFIER OFF and that is causing my problem with the indexed views. I think the stored proc setting would override the connection string setting.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply