Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@sookie-T06sFW • May 31, 2010
Hi keerthi22,
As far as I know, you need to import ojdbc14.jar into your java application and then using JDBC, you can directly connect to Oracle Database.
STEP 1: Download ojdbc14.jar file from #-Link-Snipped-#
STEP 2: Add ojdbc14.jar to the build path of you project.
STEP 3: Create a Java Program JDBCConnectDemo.java like following
![[โIMG]](proxy.php?image=http%3A%2F%2Fimg176.imageshack.us%2Fimg176%2F6320%2F61487342.png&hash=a9e0a33e8b5dc21799ed60b92b2d8242)
STEP 4: Output like following will be shown when above program will be run
![[โIMG]](proxy.php?image=http%3A%2F%2Fimg707.imageshack.us%2Fimg707%2F4923%2F53943035.png&hash=ecb9d487dd97560bceab76c1655c8778)
In above program,
URL= Connection String including HOSTNAME, PORT NO, SID.
DRIVER = Name of the driver used.
Note: In above case OracleDriver is used. You can connect to any other driver also in similar way.
Username = username used to connect to the database
Password = password used to connect to the database