Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7699479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:29:17+00:00 2026-05-31T22:29:17+00:00

i wrote program to connect oracle database 11g for my android application to store

  • 0

i wrote program to connect oracle database 11g for my android application to store values. My table name is names contains three fields. I imported ojdbc.jar file in to my project. After compiling program a log cat error displays like ” could not find the class oracle.jdbc.driver.OracleDriver() ” like this. Pls give one solution or is any other jar file i need to import?

   package com.odbc;

      import java.sql.Connection;
      import java.sql.DriverManager;
      import java.sql.PreparedStatement;

      import android.app.Activity;
      import android.os.Bundle;

        public class OdbcActivity 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:XE","system","mobile");
            PreparedStatement pst=con.prepareStatement("insert into names(name1,name2,name3) values(?,?,?)");
            pst.setString(1,a);
            pst.setString(2,b);
            pst.setString(3,c);
            pst.executeUpdate();
    }
    catch(Exception e)
    {
        System.out.println("Exception:"+e);

    }


}
     }   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:29:18+00:00Added an answer on May 31, 2026 at 10:29 pm

    Place the ojdbc.jar in libs/ directory under your android project.

    See this page for a more detailed explanation of why you need to do this with r17.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using oracle 11g. I write code to connect oracle database with java
I wrote a program which includes writing and reading from database. When I run
I wrote a program to click on an application automatically at scheduled time using
I wrote an android program that: has a main activity for UI, and it
I wrote a program that shows all the headerfield and values of a webpage.
I wrote an application that inserts some data in a SQlite database using JDBC
Recently I wrote a program using sockets in C, to connect to an HTTP
I'm trying to write a program that uses sockets to connect with other instances
I wrote several simulation programs in C++ and want to connect their outputs/inputs with
I wrote a program in C with Ubuntu Linux and now I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.