Sign Up

Have an account? Sign In Now

Sign In

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

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

SIKSHAPATH

SIKSHAPATH Logo SIKSHAPATH Logo

SIKSHAPATH Navigation

  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
  • About
    1. Asked: November 21, 2021In: Programming Language

      Inserting a record ABC International School wants to computerize students details. The school maintains a database of students in Oracle. …

      I'M ADMIN
      I'M ADMIN
      Added an answer on November 22, 2021 at 10:45 pm

      https://sikshapath.in/question/inserting-a-record-abc-international-school-wants-to-computerize-students-details-the-school-maintains-a-database-of-students-in-oracle-2/

      Inserting a record ABC International School wants to computerize students details. The school maintains a database of students in Oracle. …

      See less
        • 1
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    2. Asked: November 22, 2021In: Programming Language

      Inserting a record ABC International School wants to computerize students details. The school maintains a database of students in Oracle. …

      I'M ADMIN
      I'M ADMIN
      Added an answer on November 22, 2021 at 10:18 pm

      import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Assignment2 { public static void main(String[] args) throws SRead more

      import java.sql.Connection;
      
      
      import java.sql.DriverManager;
      
      
      import java.sql.PreparedStatement;
      
      
      import java.sql.SQLException;
      
      
      import java.util.ArrayList;
      
      
      import java.util.Arrays;
      
      
      import java.util.List;
      
      
      import java.util.Scanner;
      
      
      
      public class Assignment2 {
      
      
      
          public static void main(String[] args) throws SQLException {
      
      
              Scanner sc = new Scanner(System.in);
      
      
              Connection conn = null;
      
      
              PreparedStatement pstmt = null;
      
      
      
              try {
      
      
                  Class.forName("oracle.jdbc.driver.OracleDriver");
      
      
                  conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521", "scott", "tiger");
      
      
              } catch (ClassNotFoundException e) {
      
      
                  e.printStackTrace();
      
      
              } catch (SQLException e) {
      
      
                  e.printStackTrace();
      
      
              }
      
      
      
              int rollno = 0;
      
      
              do {
      
      
                  System.out.print("Enter rollno: ");
      
      
                  String rollstr = sc.nextLine();
      
      
      
                  try {
      
      
                      rollno = Integer.parseInt(rollstr);
      
      
                      if (String.valueOf(rollno).length() != 4) rollno = 0;
      
      
                  } catch (Exception e) {}
      
      
              } while (rollno == 0);
      
      
      
              String studentName = "";
      
      
              boolean lowercasefound;
      
      
              do {
      
      
                  System.out.print("Enter name: ");
      
      
                  studentName = sc.nextLine();
      
      
      
                  lowercasefound = false;
      
      
                  for (int i = 0; i < studentName.length(); i++) {
      
      
                      if (Character.isLowerCase(studentName.charAt(i))) {
      
      
                          lowercasefound = true;
      
      
                          break;
      
      
                      }
      
      
                  }
      
      
      
              } while (studentName.length() > 20 || lowercasefound);
      
      
      
              String standard = "";
      
      
              String[] standards = {"I", "II", "III", "IV", "V", "Vi", "VII", "VIII", "IX", "X"};
      
      
              List<String> list = new ArrayList<>(Arrays.asList(standards));
      
      
              do {
      
      
                  System.out.print("Enter standard: ");
      
      
                  standard = sc.nextLine();
      
      
              } while (!list.contains(standard));
      
      
      
              System.out.print("Enter D.O.B.: ");
      
      
              String dob = sc.nextLine();
      
      
      
              Double fees = 0.0;
      
      
              do {
      
      
                  System.out.print("Enter fees: ");
      
      
                  if (sc.hasNextDouble())
      
      
                      fees = sc.nextDouble();
      
      
              } while (fees == 0.0);
      
      
      
      
      // inserting data into db
      
      
              String sql = "INSERT INTO stdnt VALUES(?, ?, ?, ?, ?)";
      
      
              try {
      
      
                  pstmt = conn.prepareStatement(sql);
      
      
                  pstmt.setInt(1, rollno);
      
      
                  pstmt.setString(2, studentName);
      
      
                  pstmt.setString(3, standard);
      
      
                  pstmt.setString(4, dob);
      
      
                  pstmt.setDouble(5, fees);
      
      
                  pstmt.executeQuery();
      
      
                  System.out.println("Student added successfully");
      
      
              } catch (SQLException e) {
      
      
                  e.printStackTrace();
      
      
                  System.out.println("Error");
      
      
                  pstmt.close();
      
      
                  conn.close();
      
      
              }
      
      
      
              sc.close();
      
      
          }
      
      
      
      }
      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    3. Asked: November 22, 2021In: Programming Language

      Write a program in Java that enters student details (Roll No, Name etc) and retrieves information. Use oracle as a database and write …

      I'M ADMIN
      I'M ADMIN
      Added an answer on November 22, 2021 at 10:16 pm

      https://sikshapath.in/question/write-a-program-in-java-that-enters-student-details-roll-no-name-etc-and-retrieves-information-use-oracle-as-a/

      https://sikshapath.in/question/write-a-program-in-java-that-enters-student-details-roll-no-name-etc-and-retrieves-information-use-oracle-as-a/

      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    4. Asked: November 16, 2021In: Other

      Write a Java program to 1.create three radio buttons. When any of them is selected, an appropriate message is displayed.2.Write a program in Java that enters student details (Roll No, Name etc) and retrieves information. Use oracle as a database and write the application in JDBC.

      I'M ADMIN
      I'M ADMIN
      Added an answer on November 22, 2021 at 10:15 pm

      https://sikshapath.in/question/write-a-program-in-java-that-enters-student-details-roll-no-name-etc-and-retrieves-information-use-oracle-as-a/

      https://sikshapath.in/question/write-a-program-in-java-that-enters-student-details-roll-no-name-etc-and-retrieves-information-use-oracle-as-a/

      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    5. Asked: November 22, 2021In: Programming Language

      What is the role of JDBC DriverManager class?

      I'M ADMIN
      I'M ADMIN
      Added an answer on November 22, 2021 at 10:09 pm

      The DriverManager class acts as an interface between user and drivers. It keeps track of the drivers that are available and handles establishing a connection between a database and the appropriate driver. The DriverManager class maintains a list of Driver classes that have registered themselves by cRead more

      The DriverManager class acts as an interface between user and drivers. It keeps track of the drivers that are available and handles establishing a connection between a database and the appropriate driver. The DriverManager class maintains a list of Driver classes that have registered themselves by calling the method DriverManager.registerDriver().

       

      1) public static void registerDriver(Driver driver): is used to register the given driver with DriverManager.
      2) public static void deregisterDriver(Driver driver): is used to deregister the given driver (drop the driver from the list) with DriverManager.
      3) public static Connection getConnection(String url): is used to establish the connection with the specified url.
      4) public static Connection getConnection(String url,String userName,String password): is used to establish the connection with the specified url, username and password.
      See less
        • 2
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    6. Asked: November 22, 2021In: Mathematics

      solve this nlpp question urgent

      I'M ADMIN
      I'M ADMIN
      Added an answer on November 22, 2021 at 10:05 pm

      https://sikshapath.in/question/consider-following-nlpp-min-z2x12-24x12x2%c2%b2-8x22x32-12x3200-by-separating-this-function-show-that-it-is-convex/

      Consider following NLPP Min Z=2×1^2-24×1+2×2²-8×2+2×3^2-12×3+200 By separating this function show that it is convex

      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    1 … 106 107 108 109 110 … 122

    Sidebar

    store ads

    Stats

    • Questions 1k
    • Answers 1k
    • Posts 149
    • Best Answers 89
    • This Free AI Tool Translates Entire Books in Minute !
    • AI News: 🎬 Hollywood’s AI Studios, 🎓 OpenAI’s Latest Gift to Educators, 🚚 Class8 Bags $22M, 🧠 Google Gemini’s Memory Upgrade
    • AI NEWS: Legal Action Against OpenAI, $16M Paid, & Elon Musk’s Praise from Investor 🤖💰📑 | AI Boosts Cloud Seeding for Water Security 🌱💧
    • AI News: 🎬AI Video Tool Scam Exposed🤯, 🛰️ AI-Powered Drones to Ukraine 😱, Google’s $20M AI Push, Sam Altman Joins SF’s Leadership Team
    • AI News: 🤝 Biden Meets Xi on AI Talks, 💡 Xavier Niel’s Advice for Europe, ♻️ Hong Kong’s Smart Bin Revolution, 🚀 AI x Huawei

    Explore

    • Recent Questions
    • Questions For You
    • Answers With Time
    • Most Visited
    • New Questions
    • Recent Questions With Time

    Footer

    SIKSHAPATH

    Helpful Links

    • Contact
    • Disclaimer
    • Privacy Policy Notice
    • TERMS OF USE
    • FAQs
    • Refund/Cancellation Policy
    • Delivery Policy for Sikshapath

    Follow Us

    © 2021-24 Sikshapath. All Rights Reserved