File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySQL Login Form

 
Ronald Alarcon
Greenhorn
Posts: 22
Android Netbeans IDE Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Im new to swing, and im trying to develop an aplication. First One im trying to do a new login form.
My Project looks like this:

  • connection
  • entity
  • manager
  • gui


  • On connection i have this:



    On entity i have this:



    On Manager i have this:



    Now i just want to use the gui for validate the data that user introduce this action invoking the method ValidaUsuario() on my Manager, ok i want to use the parameters taking from the gui textUsr and txtPwd and validating that exist on database. How i can do that? Thanks for your help.
     
    Maneesh Godbole
    Saloon Keeper
    Posts: 10974
    11
    Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Welcome to the Ranch.

    Your question is a bit ambiguous. Are you having trouble creating and passing the usuario* object or validating the credentials with the DB?
    *Java naming conventions dictate this should be Usuario and not usuario. Same with other classes.
     
    Ronald Alarcon
    Greenhorn
    Posts: 22
    Android Netbeans IDE Redhat
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Maneesh Godbole wrote:Welcome to the Ranch.

    Your question is a bit ambiguous. Are you having trouble creating and passing the usuario* object or validating the credentials with the DB?
    *Java naming conventions dictate this should be Usuario and not usuario. Same with other classes.


    i forgot conventions... but my problem its validate the credentials whit the db, its just beacuse i dont have idea how to do that...
     
    Maneesh Godbole
    Saloon Keeper
    Posts: 10974
    11
    Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Ok. So essentially your problem is not with the GUI but making DB queries. I will move this topic over to the JDBC forum for you where such questions are usually discussed.
     
    Paul Clapham
    Sheriff
    Pie
    Posts: 20201
    26
    MySQL Database
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I don't understand... your code already has an example of a PreparedStatement which inserts data, with a specific user ID and password, into your Usuario table. Then what is so difficult about writing a PreparedStatement which selects rows from that table with a specific user ID and password?
     
    I agree. Here's the link: http://aspose.com/file-tools
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic