Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to an Oracle database from IntelliJ IDEA 14?

Could someone tell me exactly how could I manage this connection? I am doing this for like 3 days now and every example, every video on the net is about MySQL or SQLite connection with NetBeans. My goal is to put the results of a SELECT query in a JTable. Nothing more. I know I need some driver and connection URL, ResultSet, PreparedStatement, TableModel, but I didn't manage to find the perfect combination to get some results.

Thanks.

like image 254
MaXiMkA Avatar asked Jan 06 '15 22:01

MaXiMkA


People also ask

How do I connect to a specific Database in Oracle?

To connect to Oracle Database from SQL*Plus: If you are on a Windows system, display a Windows command prompt. At the command prompt, type sqlplus and then press the key Enter. At the user name prompt, type your user name and then press the key Enter.

How do I connect to a Database in IntelliJ Community Edition?

In Intellij Click on + button and select MySQL: Fill the configuration as shown: Click on Test Connection bottom: Click OK.


1 Answers

If you can't find a tutorial or video that covers all of this, then you need to combine sources that cover the individual parts of the problem.

For example:

  • This covers configuring data sources in IntelliJ 14: https://www.jetbrains.com/idea/help/configuring-a-db-data-source.html

  • This covers JDBC database URLs for Oracle databases: http://docs.oracle.com/cd/B14117_01/java.101/b10979/urls.htm#BEIJFHHB. And so does this: http://www.herongyang.com/JDBC/Oracle-JDBC-Driver-Connection-URL.html

  • The javadocs cover the various APIs you are using.

  • and so on.

like image 152
Stephen C Avatar answered Oct 12 '22 06:10

Stephen C