I have to use oracle database in android.
I have tried to work as usual java coding with oracle,but I have not succeed.
I have used this java code.
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbc:oracle:thin:@:1521:XE","SYSTEM","pis");
Statement s=con.createStatement();
s.executeUpdate("create table customer1(id int primary key,name varchar(20) not null,city varchar(20))");
s.close();
con.close();
I am new to android programming.
I don’t think you should be talking directly to the Oracle database from the device itself. Aside from anything else, the security aspect would almost certainly prove challenging. You normally want to keep your database network access pretty limited.
Usually you’d host a web service of some kind exposing business-meaningful operations, and that web service would talk to Oracle. The Android device would then talk to the web service (probably via REST, although I dare say SOAP could work).