1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Putting database items in a table

Discussion in 'JSP' started by danal, Jul 6, 2008.

  1. danal

    danal New Member

    Joined:
    Jul 6, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I am just starting to learn JSP and having some difficulties (I am very familiar in ASP.NET).

    I have a JSP page to which I added a table at design time.
    Then, I am going over some items from a database table and I want to insert those items to the table I created. The table has 2 columns: 'id1' and 'id2'.

    while (result.res.next())
    {
    int a = result.res.getInt(1);
    int b = result.res.getInt(1);
    }

    How do I put those values in the table I created?

    Thank you in advance,
    Dana
     
  2. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    569
    Likes Received:
    18
    Trophy Points:
    0
    Last edited by a moderator: Jul 7, 2008
  3. danal

    danal New Member

    Joined:
    Jul 6, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Thank you very mucg for trying to help... but it is not what I need :-(
     
  4. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    569
    Likes Received:
    18
    Trophy Points:
    0
    dang im so so so sry well i got a script that retrive infor from a database in js do u want it? it gos by 9 rows
     
  5. danal

    danal New Member

    Joined:
    Jul 6, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    I have the code that brings the data from the DB. What I am missing is the code that binds this data to a table created, from the controls list.
     
  6. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    569
    Likes Received:
    18
    Trophy Points:
    0
    so let me get this straight you have the info alrdy and u alrdy have a db and all ur trying to do is insert ur new information into the db right lol?
     
  7. danal

    danal New Member

    Joined:
    Jul 6, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    No, I am trying to bind the data to a HTML table, to show the results to the user.
    I don't want to put the data in the DB.
     
  8. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    569
    Likes Received:
    18
    Trophy Points:
    0
    k hmm well maybe we could try making a tabel n html and inside the html we connect that table with ur db to display the information
     

Share This Page