Login Form in java using Netbeans and Sql Server

About the author

Comments

  1. When I tried to use SQLServer Authentication it did not work, but When I used windows authentication it works, is there a difference?.

  2. I had an error, is this "Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: Error de inicio de sesión del usuario 'sa'. ClientConnectionId:205dc5b0-4c8f-4d73-b956-867e2db10694" Do you have the solution?

  3. thanks indra, however i ahve import the sql jar file but still saying ……….java-lang-classnotfoundexceptioncom-mysql-jdbc-driver when i press signin….. please what can i do next to solve it

  4. Hello Sir when I downloaded the sql connector, it is in .txt format. And when I try to add it in library it is not showing in the list. What should I do?

  5. thank you indra, i am using windows authentication, its giving an error. what should i do ?
    i have problem with: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver.class");

  6. hey dear i get this error and i dont why ? i just make sql authentication and give my db my pass but after i put it i received this error:com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'user'.

  7. im new to java, im having an error in Class.forName, i just actually copied all the code inside Class.forName (" "), can u help me?

  8. can you reply me the code you use in button? thanks 🙂 . its hard for me to read and type it with my poor eyevisbility 🙁

  9. Great.. Please make more videos … GOD bless you.. I have little doubt .. if you can answer.. we needed to authenticate users credential against the database credential and not the separate database where credentials are merely data of table…How one can create code for that..? pl. anybody out there to comment

  10. try{
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    String url = "jdbc:sqlserver://localhost:1433;databaseName=dbTest;user=sa;password=1234";

    Connection con = DriverManager.getConnection(url);
    System.out.println("connection created");

    String sql="select * from loginTable where Username=? and Passeword=?";
    PreparedStatement pst = con.prepareStatement(sql);
    pst.setString(1, username.getText());
    pst.setString(2, password.getText());
    ResultSet rs=pst.executeQuery(sql);
    if(rs.next())
    {
    JOptionPane.showMessageDialog(null, "password and username matched");
    //System.out.println("Address : "+rs.getString(2));
    }
    else {
    JOptionPane.showMessageDialog(null,"password or username not corrected");
    username.setText("");
    password.setText("");
    }
    con.close();
    }
    catch(SQLException e)
    {
    JOptionPane.showMessageDialog(null, e);
    }

  11. Hi, I have a problem when running my project in NetBeans 8.2 and SQL server express 2014.
    After doing the programming it shows the result as below

    " com.microsoft.sqlserver.jdbc.sqlservExeption Login failed for user ''. ClientConnectionid: d963d05c-a68b-49c0-a7e9-88b829c96174 "

    Can anybody help me with this issue, please?

  12. Hello My Brothers and Sisters. My humble request to you, Please Don't Forget To Subscribe
    If you have any problem, Comment down. I will provide you solution as soon as possible.

  13. I got a error Java. Lang. ClassNotFoundException:com. Microsoft. Sql server. Jdbc. Sql. Server Driver Plz help me

  14. Hi Indra. I am using Windows Authentication and put the JAR files into the libraries already, also putting the sqljdbc_auth.dll file into my System32 as i read the comments. But i still couldn't execute my program, with the error shown below.

    Error Pop-up Message: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionID:……….
    Error shown in netbeans:
    Mar 25, 2018 11:12:48 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
    WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path

    May i know how can i solve this?

  15. hi bro, i have a problem at :com.microsoft.sqlserver.jdbc.SQLServerExeception: The method executeQuery() cannpt take arguments on a PreparedStatement or CallableStatement

  16. I wanna Link To Make Form Insert Update delate System to Java and SQL server Plz Tel me if you Can Bro Thnx

  17. hello Sir
    i saw your tuto and it is very well made
    but i'm one thin that i don't get
    i'm working with NetBeans Build-in DataBase so how can i get the Class.ForName(" ") ? help me please

  18. bro i want some code for "current login details to show next page without using database" please rply bro as soon as possible

  19. how do i solve the problem "com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'sa'. ClientConnectionID:21e0f682-39b9-4bab-9f78-b5483df3fae6"

    my authentication is windows authentication only, do I need to change it to SQL authentication?

  20. I'm not using an IDE. I use notepad so, how do you think I can connect a database and insert data into it through notepad? (Please, tell me how can I install and use the drivers with notepad, too. Please)

  21. bro..i have a question here…where did you used the password orchid in sql ???
    if you could tell me then it will be very helpful 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *