C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




using Array List


Posted Date: 11 Jun 2008      Total Responses: 4

Posted By: naresh       Member Level: Bronze     Points: 1



can anybody suggest a link that how can i use a Array List to insert the values in to data base table.




Responses

Author: Ashutosh Kumar    11 Jun 2008Member Level: GoldRating:     Points: 2
find the value of array list one by one and insert into data base


Author: Bharathi    11 Jun 2008Member Level: DiamondRating:     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 2008Member Level: DiamondRating:     Points: 2
hi,

try like this:

SqlBulkCopy copy = new SqlBulkCopy(connectionstring);
copy.DestinationTableName = "specifysqltablename";
copy.WriteToServer(arrlist);


Author: Kumar Velu    11 Jun 2008Member Level: DiamondRating:     Points: 2
hi,

dont use " for" or "foreach" loop and all it shows down the process


Post Reply
You must Sign In to post a response.
Next : how to create html api file ?
Previous : using Array List
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use