I am developing an android application. for doing it i need to connect to oracle database. i created a connection class as in Java. but when i try to run it nothing happens. i heard that a middle ware is needed to do this task. and also something about host. i didn’t get any clear ideas of what i should do. i have checked so many blogs and googling. but none helped. will somebody explain it to me in steps what all steps should i do to create my application? please gys i am stuck here, any blogs, posts will do
/*imports*/
public class ConnectionClass
{
public Connection connectToDB(){
Connection con=null;
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection(
"jdbc:oracle:thin:@blablabla:1521:bla","usr","pass");
}catch(Exception e){ System.out.println(e);}
return con;
}
public static void main(String arg[])
{
try
{
ConnectionClass conDB=new ConnectionClass();
System.out.println("connection*&% "+conDB );
}
catch(Exception e)
{
System.out.println(e);
}
}
}
it is compiling in javac and result is obtained correctly