Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid odbc connection for oracle 10g
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/9440532/android-jdbc-odbc-connection">android jdbc odbc connection</a> </p> </blockquote> <p>before i used oracle database 11g for my android application and successfully stored values. Unfortunately my oracle database 11g could not open due to some problem . I uninstalled oracle 11g and installed oracle database 10g edition. now i compiled program and close emulator and open table in oracle the values could not be stored . I dont know how this problem occur. Here in my code i put port number 1521 and sid is 'orcl' and table name is 'sample'. Pls give one solution and any changes in port number and sid . Thanks in advance</p> <pre><code> package com.search; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import android.app.Activity; import android.os.Bundle; public class OraclesearchActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String a="karthick"; String b="vijay"; String c="vel"; try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.2:1521:orcl","system","words"); PreparedStatement pst=con.prepareStatement("insert into sample(first,middle,last)values(?,?,?)"); pst.setString(1,a); pst.setString(2,b); pst.setString(3,c); pst.executeUpdate(); } catch(Exception e) { System.out.println("Exception:"+e); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload