| Author: Ashutosh Kumar 11 Jun 2008 | Member Level: Gold | Rating: Points: 2 |
find the value of array list one by one and insert into data base
|
| Author: Bharathi 11 Jun 2008 | Member Level: Diamond | Rating: Points: 2 |
ArrayList ARR = new ArrayList(); ARR.Add(<Values>);
for (int i =0;i<=ARR.Count-1;i++) { sqlCommand Comm = new SqlCommand (<Insert into Command>,<connection>); Comm.ExecuteNonQuery(); }
|
| Author: Kumar Velu 11 Jun 2008 | Member Level: Diamond | Rating: Points: 2 |
hi,
try like this:
SqlBulkCopy copy = new SqlBulkCopy(connectionstring); copy.DestinationTableName = "specifysqltablename"; copy.WriteToServer(arrlist);
|
| Author: Kumar Velu 11 Jun 2008 | Member Level: Diamond | Rating: Points: 2 |
hi,
dont use " for" or "foreach" loop and all it shows down the process
|