wood burning stoves 2.0*
The moose likes JDBC and the fly likes MySQL Login Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL Login Form" Watch "MySQL Login Form" New topic
Author

MySQL Login Form

Ronald Alarcon
Greenhorn

Joined: May 29, 2011
Posts: 22

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.


    <<Write once run everywhere...>>
    Maneesh Godbole
    Saloon Keeper

    Joined: Jul 26, 2007
    Posts: 10175
        
        8

    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.


    [How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
    Ronald Alarcon
    Greenhorn

    Joined: May 29, 2011
    Posts: 22

    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

    Joined: Jul 26, 2007
    Posts: 10175
        
        8

    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
    Bartender

    Joined: Oct 14, 2005
    Posts: 18541
        
        8

    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
     
    subject: MySQL Login Form
     
    Similar Threads
    Problem while using prepared statement
    doubt in update
    problem to create instance
    connecting java application to JAVADB database
    retrieve picture database