Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: TAKE & PUT VALUES INTO AN ORACLE TABLE THRU A LOOP

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Location
    Kochi,India
    Posts
    18
    My Mood
    Confused
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default TAKE & PUT VALUES INTO AN ORACLE TABLE THRU A LOOP

    Hi all,

    I'm a beginner in java. I've got a small problem for which i would like to have your expert opinions.

    I've an Oracle table which has 65 fields. Apart from the first field which is of date type, rest of all the fields are number type.
    Instead of coding 65 "RecordSet.getInt" lines, is there a way to do it through a for loop ?

    Thanks in advance.


  2. #2
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: TAKE & PUT VALUES INTO AN ORACLE TABLE THRU A LOOP

    I've an Oracle table which has 65 columns
    Fixed that for you

    Instead of coding 65 "RecordSet.getInt" lines
    RecordSet? Yes, instead of using Microsoft products you could use Java. The ResultSet class:
    java resultset - Google Search
    ResultSet (Java Platform SE 6)
    Has methods which allow you to access column values by column index. Additionally, you can obtain a ResultSetMetaData object on your ResultSet so you can also obtain column names and types.

Similar Threads

  1. Help with accumulating sum values in do while loop
    By steel55677 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: June 20th, 2011, 12:01 AM
  2. [SOLVED] logic error: cpu assigning incorrect values in for loop
    By Perd1t1on in forum What's Wrong With My Code?
    Replies: 5
    Last Post: July 25th, 2010, 09:13 PM
  3. jsp and oracle
    By sri latha in forum JDBC & Databases
    Replies: 0
    Last Post: March 10th, 2010, 09:29 AM
  4. Oracle and Sun
    By copeg in forum The Cafe
    Replies: 2
    Last Post: January 31st, 2010, 07:00 AM
  5. Oracle to Buy Sun
    By Fendaril in forum The Cafe
    Replies: 2
    Last Post: June 21st, 2009, 11:48 AM