3. How to Insert Data into Database using PreparedStatement in JDBC.

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2024

Комментарии • 164

  • @THE_VIKRAM_VISION...4.O
    @THE_VIKRAM_VISION...4.O Год назад +3

    Successfully inserted Values into the table!
    Thank you! so much sir!

  • @MarceloMacieira
    @MarceloMacieira Год назад +2

    Thank you for the excellent explanation.

  • @kiransutar5257
    @kiransutar5257 2 года назад +1

    Very Nicely Explained ......
    एकदम भारी 👍👍

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  2 года назад

      थँक्स भावा व्हिडिओ बघितल्या बदद्ल. मराठी मधून कंमेन्ट बघून एकदम भारी वाटल बघ

  • @FireNoon50829
    @FireNoon50829 Год назад +3

    Great explanation good job.

  • @rishadrio9676
    @rishadrio9676 Год назад +2

    You explained well and easy to understand the concept...

  • @THE_VIKRAM_VISION...4.O
    @THE_VIKRAM_VISION...4.O Год назад +1

    Thank you! Very Much Sir!, Such a wonderful Explanation

  • @dayanandswami8109
    @dayanandswami8109 2 года назад +1

    Dear Sir,
    I Thank you for your valuable guidance.
    Thanks a lot

  • @sriganeshreddynallamilli6687
    @sriganeshreddynallamilli6687 2 года назад +2

    You really explained very well bro... Thanks for your Support...🤝🤝

  • @shubham_shubham
    @shubham_shubham 24 дня назад +1

    enjoyable ... i did this

  • @vishvajeetkivande
    @vishvajeetkivande Год назад +1

    Very nice thanku sir🙏🙏

  • @atharv1312
    @atharv1312 3 года назад +1

    Outstanding

  • @SAUMILPatel2
    @SAUMILPatel2 3 года назад

    Awesome explanation !!

  • @UjjwalKumar-tv5ms
    @UjjwalKumar-tv5ms Год назад +2

    bhaiya could you please help me.. i am getting error : - Exception in thread "main" java.lang.RuntimeException: Something went wrong
    at com.jdbc.student.StudentDatabase.main(StudentDatabase.java:36)
    my database name is correct , everything is done according to your concept.. then why this errors are coming. please help asap. thanks

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  Год назад +1

      I need to take a look to code in order to help you

    • @UjjwalKumar-tv5ms
      @UjjwalKumar-tv5ms Год назад +1

      @@LearnProgrammingYourself Thanks bhaiya..but the problem got resolved... Actually i was giving wrong password that's why i faced this issue. But anyway..your course was too much helpful. Thanks.

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  Год назад +1

      Ohh great

  • @nikhil5062
    @nikhil5062 3 года назад +1

    Thankyou bhaiya ..❤️❤️

  • @nikhil5062
    @nikhil5062 3 года назад +1

    If I watch this whole series , is it sufficient for whole jdbc , have you covered all the concepts.

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад

      Yes. From practical perspective JDBC is nothing more than what I have covered in this series. If we talk about interview then most of the questions will be around these concepts only.

    • @nikhil5062
      @nikhil5062 3 года назад +1

      @@LearnProgrammingYourself ok I really appreciate you .. because this is one of the best series nowadays I did not find like this kinda videos on youtube I searched a lot but in vain but at last I end up with this serie .
      If there is any more concept related to jdbc so make it full. It l really going to good in future 👍👍

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад

      Thanks a lot @Nikhil. Glad to hear this. Your few words will really motivate me towards my work.
      Thanks a lot again.

  • @ishikajain1556
    @ishikajain1556 Год назад +1

    Sir, you explained very well but eclipse is not allowing me to add external jar files, I followed exact steps as you said, please help!

  • @kmonika4718
    @kmonika4718 2 года назад +1

    where will we get the driver name that you have added in the start?

  • @atharv1312
    @atharv1312 3 года назад +2

    Sir, I request you to upload playlist on servlet, Javascript and MVC as well because no channels are there which explains like you

  • @red5hat
    @red5hat 2 года назад +1

    You have goofed up one of your mistake in the video. Whatever reason you mentioned for error, it was not correct.😂 Anyway, everyone makes mistakes and have doubts and confusion while writing codes. Good job. Keep it up.

  • @bhanusiva4k86
    @bhanusiva4k86 11 месяцев назад +1

    Sir I have a doubt in jdbc connectivity sir could you please resolve this .....

  • @lucky-2024
    @lucky-2024 9 месяцев назад

    Instead of only raj how can we add multiple names, percentage address...at a time?

  • @harshojha2292
    @harshojha2292 Год назад +1

    mere me to java.lang.null pointer exception how to resolve that

  • @__sr5806
    @__sr5806 3 года назад +1

    sir, for me the issue is "java.sql package is not available",please help me

  • @shravangoudbangla1862
    @shravangoudbangla1862 Год назад +1

    ❤❤

  • @ayushw6773
    @ayushw6773 2 года назад +2

    Bro have you added this code on github or somewhere?

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  2 года назад +1

      I am really sorry. I haven't added this code to git but if I find this code now then I will add and share a link.

  • @nivethat4457
    @nivethat4457 Год назад +1

    Class. ForName is a exception one

  • @sanjana9727
    @sanjana9727 Год назад +1

    Can we consider this as a project or not?

  • @SAUMILPatel2
    @SAUMILPatel2 3 года назад +1

    Exception in thread "main" java.lang.RuntimeException: something went wrong
    at jdbc/com.jdbc.student.StudentDatabase.main(StudentDatabase.java:36)
    its showing this . can you please help

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад +1

      Can you check your mysql database url?

    • @SAUMILPatel2
      @SAUMILPatel2 3 года назад +1

      I don't know how to get the url..

    • @SAUMILPatel2
      @SAUMILPatel2 3 года назад +1

      Means I have copied urs.and changed the name at last
      jdbc:mysql://localhost:3306/test

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад

      The exception is at line 36 in StudentaDatabase.java.
      Can you send that line here? I will check what is wrong exactly

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад

      And what is in try block?

  • @harshitapilodiya8301
    @harshitapilodiya8301 8 месяцев назад

    I have error in private static Connection connection=null;

  • @authenticboy1811
    @authenticboy1811 15 дней назад

    while inserting values I'm getting error Exception in thread "main" java.lang.RuntimeException: Something went wrong
    at employessDetails.EmployeesData.main(EmployeesData.java:40)
    please help me with that

  • @harishkannanmr.awesome3810
    @harishkannanmr.awesome3810 Год назад +1

    How to dynamically enter the table name also?

  • @Abhi-mz8xd
    @Abhi-mz8xd 2 года назад +1

    why to add IntegerparseInt when we are entering direct Integer datatype??

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  2 года назад

      Yes your question is correct. Actually this is one of important concept that we need to understand. I will try to create one session on this.

  • @ruchaliatkari5123
    @ruchaliatkari5123 2 года назад +1

    I have error in Exception thread main java.lang.RuntimeException please help me please

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  2 года назад

      if you share me some details like where exactly you are getting exception then I can help.

    • @ruchaliatkari5123
      @ruchaliatkari5123 2 года назад

      Can you give me your e-mail id

    • @ruchaliatkari5123
      @ruchaliatkari5123 2 года назад +1

      Where i can share the details tell me it's urgent please

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  2 года назад

      If possible you can share me github repository link so that i can look. Or you can directly share me zip file of your project via email. Email id is mentioned in about section of channel

    • @ruchaliatkari5123
      @ruchaliatkari5123 2 года назад +1

      Email id not found in your about

  • @sunshine3008
    @sunshine3008 2 года назад +1

    Someone please help on how to connect to Oracle database and call a stored procedure?

  • @angeldaniel9954
    @angeldaniel9954 Год назад +1

    sir plz help me in this one.
    Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
    enter choice
    1. Insert data
    1
    inside insert record()
    Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.sql.Connection.prepareStatement(String)" because "com.jdbc.student.StudentDatabase.connection" is null
    at com.jdbc.student.StudentDatabase.insertRecord(StudentDatabase.java:42)
    at com.jdbc.student.StudentDatabase.main(StudentDatabase.java:29)

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  Год назад

      I think you are not assigning value to the connection and that’s why it is giving null on connection object. Make sure you are assigning value to the connection

  • @m.aravindkm233
    @m.aravindkm233 3 года назад +1

    I am getting java.lang.Runtime Exception see MySQL line 1coming...

  • @ranveerkanda
    @ranveerkanda Год назад +1

    Sir need to contact you urgently, whats the best method?

  • @payalgaikwad-xb3ed
    @payalgaikwad-xb3ed 2 года назад +1

    how to set date format in prepared statement

  • @aadityadhamane76
    @aadityadhamane76 Год назад +1

    can you pls share the src

  • @dishagangurde3943
    @dishagangurde3943 3 года назад +2

    null values are inserted instead of actual values
    plz help

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад +1

      Hi Disha, There are couple of ways to handle this case.
      1. Can you please try to print the values before inserting? So that you can make sure you are getting input correctly.
      2. First of all try to insert hard coded values?
      I hope it will help. Please let me know if any help is required.

    • @dishagangurde3943
      @dishagangurde3943 3 года назад +1

      @@LearnProgrammingYourself thnx .. turns out it was a silly mistake... Name of variables in java and database were not same

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад +1

      That sounds really cool. Thanks Disha

  • @NiharikaKirad-t8e
    @NiharikaKirad-t8e 2 месяца назад

    why is null value assigned?

  • @yogendrasinghpanvar
    @yogendrasinghpanvar 3 года назад +1

    jdbc connection in Java EE
    Sir Please help me

  • @harharmahadev1038
    @harharmahadev1038 2 года назад +1

    it says StudentDatabase cannot be resolved to a type

  • @adityaverma1792
    @adityaverma1792 Год назад

    Sir facing error since last 3 days can u please help !!!

  • @UjjwalKumar-tv5ms
    @UjjwalKumar-tv5ms Год назад +1

    PLease help me

  • @SudhanManuel.R
    @SudhanManuel.R Год назад +1

    The fact that you gave 78% to Sonali, proves that she's your Sister🤣. Am I right?

  • @ruchaliatkari5123
    @ruchaliatkari5123 2 года назад +1

    I have a error

  • @spcreation979
    @spcreation979 2 года назад +1

    why are you declaring Scanner as private.

  • @ruchaliatkari5123
    @ruchaliatkari5123 2 года назад +1

    Can you please help me

  • @ruchaliatkari5123
    @ruchaliatkari5123 2 года назад +1

    Hii

  • @roshanjadhav9204
    @roshanjadhav9204 8 месяцев назад

    sir please source code comment kardo

  • @abhayransingh1937
    @abhayransingh1937 3 года назад +1

    Exception in thread “main” Java.Lang.runtime exception:some went wrong at com.jdbc.student.studentdatabase. Main (StudentDatabase.Java:27)
    Plz reply and help me

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад +1

      Can you send me the code where your are inserting values?
      This exception must be because url of database or column and value mapping.

    • @abhayransingh1937
      @abhayransingh1937 3 года назад

      @@LearnProgrammingYourself
      package com.jdbc.student;
      import java.sql.Connection;
      import java.sql.DriverManager;
      import java.util.Scanner;
      public class StudentDatabase {
      private static Connection connection = null;
      private static Scanner scanner=new Scanner(System.in);
      public static void main(String[] args) {
      StudentDatabase studentdatabase=new StudentDatabase();
      try {
      Class.forName(" com.mysql.cj.jdbc.Driver");
      String dbURL="jdbc:mysql://localhost:3306/jdbcdb";
      String username="root";
      String password="Lipan@1234";
      connection=DriverManager.getConnection(dbURL, username, password);
      System.out.println("enter choice");
      System.out.println("1. insert record");
      int choice=Integer.parseInt(scanner.nextLine());
      switch(choice) {
      case 1:
      studentdatabase.insertRecord();
      break;
      default:
      break;
      }
      }catch(Exception e) {
      throw new RuntimeException("some went wrong");
      }
      }
      private void insertRecord() {
      System.out.println("inside insert record()");
      }
      }
      Sir this is my code plz go through it

    • @abhayransingh1937
      @abhayransingh1937 3 года назад

      I send you plz check and reply
      I’m waiting for the replyw

    • @abhayransingh1937
      @abhayransingh1937 3 года назад

      @@LearnProgrammingYourself
      Sir please reply....

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  3 года назад

      Are you sending the link?

  • @pradeepella
    @pradeepella Год назад +1

    getting this sir Exception in thread "main" java.lang.RuntimeException: Something went wrong
    at com.jdbc.student.StudentDatabase.main(StudentDatabase.java:38)

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  Год назад

      Please check your connection references

    • @pradeepella
      @pradeepella Год назад +1

      @@LearnProgrammingYourself can you connect in a meet and help me out sir

    • @LearnProgrammingYourself
      @LearnProgrammingYourself  Год назад

      Yes we can connect. Please ping me your details on my email id so that I will schedule a call.