Results 1 to 4 of 4
  1. #1
    stefanybaez is offline Member
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    Default Java and database value printing

    Sorry if this is the wrong place for this question!

    I have an access database connected to a java program i wrote. Its supposed to be used to make a school schedule without allowing any hour collision or classroom etc. I have a table where the schedules are saved, in that table there's a colum in which i save the classroom, hours and day of the class
    This is the format in which its saved (CLASSROOM-STARTS-ENDS-DAY)
    Is there a way i can then print those separately ? If i wanted to show each one in separate columns using java, is that possible ? If so, how ??

    Thanks A LOOOOT in advance.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Let me try to clarify this for me: so when you retrieve info from the database, you get a String with bits of data separated by hyphens? If so, you can split the String with the split("-") method and use the resulting String array to populate a new JTable that has the columns you need.

  3. #3
    stefanybaez is offline Member
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    Default

    I just came to say thanks! It worked great! You just helped me with one of the biggest problems i was having.
    Thanks again!

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Replies: 1
    Last Post: 12-02-2008, 09:48 AM
  2. Problem in printing java graphics
    By Mahendra in forum Java 2D
    Replies: 0
    Last Post: 01-23-2008, 01:45 PM
  3. Printing using java
    By ramachandran in forum Advanced Java
    Replies: 1
    Last Post: 01-05-2008, 11:16 AM
  4. [Java Printing]
    By remnahush in forum Advanced Java
    Replies: 1
    Last Post: 11-08-2007, 04:28 PM
  5. PDA, Database, and Java
    By percivalwcy in forum CLDC and MIDP
    Replies: 0
    Last Post: 08-08-2007, 04:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •