Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java/Mysql Please help me

Options
  • 16-07-2009 2:40am
    #1
    Closed Accounts Posts: 32


    Hey guys. I am working on a project for college using java and mysql. I so far have managed to successfully connect to the mysql through java, and view the records in the database, but after this point I become stuck. I am developing this project on a vista operating system.

    Basically I need to be able to insert, delete and update information on the tables in my database through a java gui, and run various other queries on the database. I have exhausted google and cannot seem to find any good examples or tutorials to help me out. Nearly everything I have come across has been to do with netbeans.

    I am now desperate at this stage. If anybody can offer any help, idea's or tips it would very much appreciated.

    Many thanks


Comments

  • Registered Users Posts: 6,236 ✭✭✭Idleater


    netbeans is an ide or Integrated development environment. It is one tool that can aid you when writing code by providing syntax highlighting, available options, class navigation etc as well as graphical wizards for doing things like connecting to databases.
    What are you using for writing your code at the moment? If it's not an ide, i'd suggest downloading one as a first port of call. Netbeans is okay, but i prefer eclipse. Both are free.
    Next you will have to outline further what you are actually using- java swing or Web front end? Ejb? Jpa?...
    If it is a simple web fronted database there are possibly easier tools than java. If it is a learning experience, provide more background.


  • Closed Accounts Posts: 32 SoItsMe


    I have just been typing all my code up using edit plus. It is java swing that I am using.
    Basically the project that I am trying to create is a staff scheduling system. I need to have a database which stores all employee information such as their personal details, their work details, their availabilty to work, and their holidays. I then need to be able to query the database to tell me which staff are available to work and when. I also need to be able to insert, delete and update this information in the database. Basically I any processing that I do on the database needs to be done through java, and I need to have a nice gui on the whole system.


  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    You need to set up a query using the java sql library. If you can do a select, you can do an update. Have a look at Prepared statements in java. Get a simple insert working just through java, then try get column data from a textbox when doing an insert, and build it up from there.


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    If this is something you need to get done in a hurry then Hibernate is your friend (bit of a learning curve but not too bad for simpler tasks like insertions etc), plenty of tutorials available too. If it is just educational then no harm to do it with JDBC so you get a better feel of how it all works.


Advertisement