Last updated on DECEMBER 28, 2016
Applies to:JDBC - Version 18.104.22.168.0 and later
Information in this document applies to any platform.
How can you connect to both an 11g database and a 12c database with the same Java/JDBC code?
This can be accomplished if the hostname (or IP address), port number, and service name are provided as input parameters rather than hard-coded.
The syntax of the connect string is key. For example, the following code snippet may throw an error:
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms