Steps to Connect with Database đŸ”„đŸ”„ | Explained in Detail (Java Database Connectivity) - JDBC #3

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 13. 07. 2019
  • What are the steps that are required to connect with the database in JDBC.
    I have explained in brief what are the steps to follow to connect with database and perform operations with the database.
    Steps to Connect with Database , explained in Detail (Java Database Connectivity) - JDBC #3
    how to connect java program with database
    1) load the driver:
    Class.forName("com.mysql.jdbc.Driver")//
    2)Create a Connection:
    Connection con=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/dbname","root","root");
    3)Create query, Statement , PreparedStatement , CallableStatement
    eg
    String q="select * from students";
    Statement stmt=con.createStatement();
    ResultSet set=stmt.executeQuery(q);
    4)Process the data :
    while(set.next())
    {
    int id=set.getInt("studentID");
    String name=set.getString("studentName");
    System.out.println(id);
    System.out.println(name);
    }
    5) Close the connection:
    con.close();

Komentáƙe • 68

  • @niharikakumar1533
    @niharikakumar1533 Pƙed 2 lety +4

    Thank you sir 😌😌
    You provided me with a strong foundation of JDBC.

  • @rohan8758
    @rohan8758 Pƙed měsĂ­cem +1

    great explanation!

  • @NikhilSingh-ox9pc
    @NikhilSingh-ox9pc Pƙed rokem +1

    21:10 kaun kehta hai Java Difficult hai...
    Difficult tha ab nhi hai, THANK YOU soo much sir :)

  • @SagarSinghAwesome
    @SagarSinghAwesome Pƙed 3 lety

    Awesome video with great explaination.👌👌

  • @ashwindev1090
    @ashwindev1090 Pƙed 2 lety

    Seriously sir mujhe bohat dar lag raha for this topic and u helped me out , hats off to you. Expecting more videos on java for java developers

  • @sounaksaha1455
    @sounaksaha1455 Pƙed 3 měsĂ­ci

    Kaun kehta hai Java difficult hai, thanks for your immense inputs bro!

  • @afreenbegum1238
    @afreenbegum1238 Pƙed 4 lety +2

    Zabardast padhaheh bhai

  • @nasibsingh3594
    @nasibsingh3594 Pƙed 3 lety

    TopClass And InDeapth Teaching

  • @shankar7435
    @shankar7435 Pƙed 26 dny

    Super❀❀❀

  • @rizvicomputercodes3968
    @rizvicomputercodes3968 Pƙed 4 lety +1

    The unmost unrated channel but acha video bana te ho

  • @mdhasnainansari3051
    @mdhasnainansari3051 Pƙed 4 lety +2

    Excellent sir g

  • @SantoshKamble-zk3fn
    @SantoshKamble-zk3fn Pƙed 2 lety

    If my class teacher tech this type wow u r osm sir love you sir

  • @Anand-ol7jy
    @Anand-ol7jy Pƙed 2 lety

    Great 👌

  • @bobbybhatta9957
    @bobbybhatta9957 Pƙed 2 lety +1

    hii sir thanks lot for this oswm playlist. sir please we need java projects

  • @yashwantkaki5072
    @yashwantkaki5072 Pƙed 3 lety

    PerfectđŸ”„

  • @sagardhankar1449
    @sagardhankar1449 Pƙed 3 lety

    bhai aap jo bhi batate ho sab samajh aa jata h😀

  • @anujsharma1265
    @anujsharma1265 Pƙed 4 lety +3

    Thanks bhaii👍👍

  • @abhinegi4977
    @abhinegi4977 Pƙed rokem

    great video

  • @kotitechycommunity2766
    @kotitechycommunity2766 Pƙed rokem

    great one

  • @renukapatil4213
    @renukapatil4213 Pƙed 3 lety

    Great😃

  • @RaushanKumar-qb3de
    @RaushanKumar-qb3de Pƙed rokem

    Mast sir. Thanks... ❀❀❀

  • @pushkargoyal4278
    @pushkargoyal4278 Pƙed 3 lety

    nyc explanation

  • @Have-attitude
    @Have-attitude Pƙed rokem

    thanks sir
    you are great 🙏

  • @jojven7514
    @jojven7514 Pƙed rokem

    awesome vdo

  • @samarthdeshpande3794
    @samarthdeshpande3794 Pƙed 7 měsĂ­ci

    Sat sat pranam apko🙏

  • @kumarsamyak513
    @kumarsamyak513 Pƙed rokem +2

    demo of JDBC should also be on command prompt using java program

  • @skofficial387
    @skofficial387 Pƙed 4 měsĂ­ci

    ❀❀❀❀❀ thank you 😊😊😊😊

  • @bhavikthanki8821
    @bhavikthanki8821 Pƙed 4 lety +3

    👏👏👏👏

  • @shekhar1497
    @shekhar1497 Pƙed 2 lety

    thank you.

  • @JAY9896864656
    @JAY9896864656 Pƙed 3 lety

    Good

  • @_sarthak_.2
    @_sarthak_.2 Pƙed 2 lety

    simply we can use BufferReader also to fetch data

  • @NasirAnsari-kd2vp
    @NasirAnsari-kd2vp Pƙed 9 měsĂ­ci

    ❀

  • @vivekanandpandey4114
    @vivekanandpandey4114 Pƙed 2 měsĂ­ci

    Hare Krishna Hare Krishna Krishna Krishna Hare Hare
    Hare Rama Hare Rama Rama Rama Hare Hare ❀❀
    Raadhe Raadhe ❀❀
    Jai Shree Ram ❀❀❀

  • @sachinsonone1823
    @sachinsonone1823 Pƙed 4 lety

    Please make videos on exceptions handling

  • @pratibhanevhare2757
    @pratibhanevhare2757 Pƙed 7 měsĂ­ci +1

    sir I face this issue while connectivity java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist please solve this problem

  • @wolontong
    @wolontong Pƙed 2 lety +1

    i didnt see you put any sketchy jar file from untrusted link into your library folder like other youtuber told us to.

  • @hemantvishwakarma6568
    @hemantvishwakarma6568 Pƙed 3 lety

    Sir should i get Driver link...we were not get the driver proper from google.

  • @flyingbomber
    @flyingbomber Pƙed 2 lety +8

    sir pls work on audio .its very low

  • @Tarun36876
    @Tarun36876 Pƙed 7 měsĂ­ci

    Which OS you are using ?

  • @aniruddhachunne3011
    @aniruddhachunne3011 Pƙed 3 lety

    sublime text editor

  • @Ramdut369
    @Ramdut369 Pƙed 2 lety

    Sir latest NetBeans IDE KA JDBC with my SQL dalo na......kisi ne bhi nahi dala video iske upar.....new version me library ka option nahi hai

  • @prathamvora1349
    @prathamvora1349 Pƙed rokem

    how to find fully classified classname of oracle jdbc jar file??? please help

  • @SalmanMaqbool-tu9id
    @SalmanMaqbool-tu9id Pƙed rokem

    if all these are interfaces how we are creating object

  • @RaxpperGaming
    @RaxpperGaming Pƙed rokem +1

    sir an error genreted , javap is not recognized

  • @arjunchaurasiya6709
    @arjunchaurasiya6709 Pƙed 2 lety

    Voice is very slow sir in this video

  • @mihirshirgaonkar7832
    @mihirshirgaonkar7832 Pƙed 3 lety

    Ky bolte ho bhai
    Mazha atta hai sunne me😅

  • @susheel.1212
    @susheel.1212 Pƙed rokem

    mac book mai sql connector install kesa kren

  • @aniruddhachunne3011
    @aniruddhachunne3011 Pƙed 3 lety

    editor konsa hai ye

  • @kumarsamyak513
    @kumarsamyak513 Pƙed rokem

    sir where to load the driver?

  • @mindbehaviour9195
    @mindbehaviour9195 Pƙed 2 lety

    đŸ˜”

  • @shameem-32-evening95
    @shameem-32-evening95 Pƙed 7 měsĂ­ci

    javap' is not recognized as an internal or external command,
    operable program or batch file.
    How to solve this error???????

    • @rushi5709
      @rushi5709 Pƙed 7 měsĂ­ci +1

      Step 1: Locate JDK Installation Directory
      Locate the directory where you have installed the Java Development Kit (JDK). For example, if you installed JDK 17, the path might be something like C:\Program Files\Java\jdk-17.
      Step 2: Set JAVA_HOME
      Right-click on "This PC" or "Computer" on your desktop or in File Explorer.
      Select "Properties."
      Click on "Advanced system settings" on the left.
      Click the "Environment Variables" button.
      Under "System variables," click "New."
      Enter JAVA_HOME as the variable name and the path to your JDK installation as the variable value (e.g., C:\Program Files\Java\jdk-17).
      Step 3: Update PATH
      In the "Environment Variables" window, find the "Path" variable under "System variables" and click "Edit."
      Click "New" and add %JAVA_HOME%\bin to the list.
      Step 4: Restart Command Prompt
      Close any open Command Prompt windows and open a new one to ensure that the changes to the environment variables take effect.
      Step 5: Verify Java Tools
      Open a new Command Prompt and type the following commands:
      Now, you should be able to use Java tools such as javap without encountering the "not recognized" error. If the issue persists, double-check the steps to ensure there are no typos or errors in the environment variable settings.
      Hope this helps.

  • @sheenabisht8629
    @sheenabisht8629 Pƙed 3 lety

    Sir I'm facing an error in MySQL command line client, everytime I enter password it crashes. What should I do? Please let me know.

    • @subhu143
      @subhu143 Pƙed 2 lety

      Enter correct password.. Bro

    • @pratikshakheme
      @pratikshakheme Pƙed 2 lety

      Same happens with me, Im entering correct password, plz reply sir

    • @srschool4298
      @srschool4298 Pƙed 2 lety

      @@pratikshakheme if you will enter wrong it will close automatically without any error

    • @pratikshakheme
      @pratikshakheme Pƙed 2 lety

      @@srschool4298 yes, solved sir

  • @saurabhtapkir433
    @saurabhtapkir433 Pƙed rokem

    No suitable driver found for Url error

  • @TechcodeBoy
    @TechcodeBoy Pƙed 3 lety

    Mera ak error a raha hai kaha pe chat karke puche

  • @yashupadhyay1023
    @yashupadhyay1023 Pƙed 4 měsĂ­ci

    mko kuch samajh ku nhi aya

  • @AshutoshKumar-es8xy
    @AshutoshKumar-es8xy Pƙed 2 lety +1

    com.mysql.cj.jdbc.Driver is the new class