Does it say this:
"Where is your Oracle JDBC Driver?"
Or this:
"oracle driver is not installed check console"
?
On Friday, July 27, 2012 6:42:11 AM UTC-5, parthi wrote:
>
> How to connect oracle database using android
>
>
>
> import java.sql.Connection;
> import java.sql.DriverManager;
> import java.sql.SQLException;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.widget.TextView;
>
> public class AndroidoracleActivity extends Activity {
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> TextView tv = new TextView(this);
> tv.setText("orcale Connect Example.");
> setContentView(tv);
>
> try {
>
> Class.forName("oracle.jdbc.driver.OracleDriver");
>
> } catch (ClassNotFoundException e) {
>
> tv.setText("Where is your Oracle JDBC Driver?");
> e.printStackTrace();
> return;
> }
> tv.setText("Oracle database driver register");
> Connection conn =null ;
>
> try {
> conn
> =DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe",
> "Parthiban",
> "Parthiban");
>
> }
> catch(SQLException e){
> tv.setText("oracle driver is not installed check console");
>
> e.printStackTrace();
> return ;
>
> }
> if(conn !=null){
> tv.setText("oracle database registered u masde it to control");
>
> }
> else {
> tv.setText("failed to connection");
> }
>
> }
> }
>
>
> i did this code but it showing no driver wt i want todo...help me
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en