How to update table column from the values of Arraylist in java
Hii Sir,
I have an arraylist containing these values [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 3, 3, 1, 1, 1] .Now As per my need i have to add these values into different fields of single column of database table.
plz give me the code of this problem.Thank you Sir.
View Answers
October 10, 2012 at 4:04 PM
public class Example {
public static void main(String[] args) {
List<Integer> list = new ArrayList();
list.add(1);
list.add(2);
list.add(3);
list.add(4);
list.add(5);
list.add(6);
list.add(7);
list.add(8);
list.add(9);
list.add(10);
for (Integer i : list) {
//insert your query here and pass the value from "i"
}
}
}
Ads
Related Tutorials/Questions & Answers:
Advertisements
Arraylist from row values
Arraylist from row values Hello,
can anyone please help on
how to make an
arraylist from the row
values of a particular
column from a database
table?
Thanks in advance!
import java.sql.*;
import java.util.ArrayList
How to update,Delete database values from jtable cells ..
How to
update,Delete database
values from jtable cells .. Hello Sir, I am working on a project in which i have to fetch the
values from database... records
from the
table cells by entering new
values there only ...
Sir,plz send me
How to Display values from databse into table
How to Display
values from databse into table I want to display
values from database into
table based on condition in query,
how to display... enter either bookname or authorname and click on search button the
values from
Delete row and column from table through java code
will see
how to delete row and
column from given
table through
java code.
Java code... Delete row and
column from table through
java code... present
in
table : "+count);
/* Here sql query find the element
from
How to update,Delete database values from jtable cells ..
How to
update,Delete database
values from jtable cells .. hello Sir...
from database into jtable of a jpanel.. Now Sir, According to my need i have to
update the cell
values from there only means that whatever
values i ma entering
how to remove the column from a java web page
how to remove the
column from a
java web page i have a web page with account#, qtr, year if i want to remove the year
column which is a drop down list
from my jsp what should i do and what is the process please give a brief view
Delete a Column from a Database Table
Delete a
Column from a Database
Table
 ... to delete a
column from a database
table. We are not going to create a new
table... a
column from a database
table
then we have been provided with the database
how to display values from database into table using jsp
how to display
values from database into
table using jsp I want to display
values from database into
table based on condition in query,
how... the
values from database based on the bookname or authorname entered must be display
inserting all the values in a html table column
inserting all the
values in a html
table column strong text
hai everyone,
i'm a fresher to servlet i need to know that,
how can i insert all the
values in a html
table column into a database.
Thanks in advance
How to values from xml using java?
How to
values from xml using
java? Hi All,
I want to read value
from following < Line> xml using
java.. In < Line>,data is in format of key and value pair.. i want to read only
values..could u plz help me
How to update table in Hibernate
How to
update table in Hibernate Hi, I have a
table in database that has two fields in it. Student Name and ID, can anyone explain me
how to
update these tables in Hibernate.
Thanks.
Update table query in Hibernate
Retrive values from an arraylist and display in a jsp?
Retrive
values from an
arraylist and display in a jsp? Hi,
I need help in jsp to display
values of an
ArrayList in jsp.
There is a
java file containing a method which is returning an
ArrayList.
I want to display the records
Retrive values from an arraylist and display in a jsp?
Retrive
values from an
arraylist and display in a jsp? Hi,
I need help in jsp to display
values of an
ArrayList in jsp.
There is a
java file containing a method which is returning an
ArrayList.
I want to display the records
How to add a column in a table
How to add a
column in a
table
 ... should know
how you can modify the structure of the
table. The problem is
that we have to add a new
column to our database by using the
java program
update one table from another table
update one
table from another table hello, i need to
update one
table fields by using another
table fields. I have to tables Products.... for example TotalQuantity field
from Products
table should be updated if i