oracle 11g connectivity with java -


i've oracle[11g] database on remote server(on lan). how configure oracle jdbc drivers how connect database. i've tried lot of code samples nothing worked. want read data table , put access(.accdb) file. regards

try { class.forname("oracle.jdbc.driver.oracledriver"); system.out.println("oracle drivers loaded"); string dburl="jdbc:oracle:thin:@[ip goes here]:xe"; string user="reportuser"; string pwd="report"; connection conn=null; conn=drivermanager.getconnection(dburl,user, pwd); statement stmt=conn.createstatement(); }

    catch(classnotfoundexception e){         system.out.println("there error in connection "+e);     } 

the question generic on scenario on how connecting database.

if using eclipse java development can configure jpa in project , define url(your lan machine ip db running) user name , password. set jar in path.

if not using eclipse open odbc datasource administrator (use odbcad32.exe in run) make sure have appropriate driver oracle on there

or if downloaded jar copy jar in lib folder.


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

jquery - jqGrid update specific column data with out refreshing the entire column? -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -