Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
AnswerRe: "One or more exceptions" occurred at Task.Start() Pin
Richard Deeming19-Jun-14 4:06
mveRichard Deeming19-Jun-14 4:06 
GeneralRe: "One or more exceptions" occurred at Task.Start() Pin
Sharath C V19-Jun-14 20:02
professionalSharath C V19-Jun-14 20:02 
QuestionSendkeys to excel without open workbook - C# Pin
bonjot19-Jun-14 1:26
bonjot19-Jun-14 1:26 
AnswerRe: Sendkeys to excel without open workbook - C# Pin
Pete O'Hanlon19-Jun-14 2:11
mvePete O'Hanlon19-Jun-14 2:11 
GeneralRe: Sendkeys to excel without open workbook - C# Pin
bonjot19-Jun-14 2:27
bonjot19-Jun-14 2:27 
AnswerRe: Sendkeys to excel without open workbook - C# Pin
Dave Kreskowiak19-Jun-14 2:11
mveDave Kreskowiak19-Jun-14 2:11 
GeneralRe: Sendkeys to excel without open workbook - C# Pin
bonjot19-Jun-14 2:29
bonjot19-Jun-14 2:29 
QuestionC# FOR Loop Speed Issue Pin
exfosys18-Jun-14 21:02
exfosys18-Jun-14 21:02 
Please Help

I am developing a C# windows form with a Data Grid View with list view

Task:-
Perform faster insert and update from a C# application
I have to inserting huge data (around 100,000 rows or more) from a list view/grid or data table to a SQL Server database.

How to improve the speed of the following loop which takes more then 3Hours and going outbound. Is there any other way

Eg:
Calculate button click event -> calculation part -> fill list view

total_emp = 100,000;
//lot of calculations in the list
lvloanDetails.Items.Clear();

for (int i = 0; i < total_emp; i++)
{
ListViewItem lvi = new ListViewItem(emp_id.ToString("D2"));  

loan_balance get from =(formula/additions/diductions/calculations) 
  
lvi.SubItems.Add(loan_balance.ToString("#,0.00"));
      lvLoanDetails.Items.Add(lvi);
i++;
}

Process button click event -> list view’s data insert in to sql database table 

for (int i = 0; i < lvLoanDetails.Item.Count; i++) //item count = 100,000
{
insert -> list view to sql
i++;
}

AnswerRe: C# FOR Loop Speed Issue Pin
Pete O'Hanlon18-Jun-14 21:18
mvePete O'Hanlon18-Jun-14 21:18 
AnswerRe: C# FOR Loop Speed Issue Pin
OriginalGriff18-Jun-14 21:51
mveOriginalGriff18-Jun-14 21:51 
GeneralRe: C# FOR Loop Speed Issue Pin
exfosys18-Jun-14 22:41
exfosys18-Jun-14 22:41 
GeneralRe: C# FOR Loop Speed Issue Pin
OriginalGriff18-Jun-14 23:12
mveOriginalGriff18-Jun-14 23:12 
AnswerRe: C# FOR Loop Speed Issue Pin
Mycroft Holmes18-Jun-14 22:31
professionalMycroft Holmes18-Jun-14 22:31 
GeneralRe: C# FOR Loop Speed Issue Pin
exfosys18-Jun-14 22:42
exfosys18-Jun-14 22:42 
GeneralRe: C# FOR Loop Speed Issue Pin
Mycroft Holmes18-Jun-14 22:54
professionalMycroft Holmes18-Jun-14 22:54 
GeneralRe: C# FOR Loop Speed Issue Pin
exfosys18-Jun-14 23:50
exfosys18-Jun-14 23:50 
GeneralRe: C# FOR Loop Speed Issue Pin
PIEBALDconsult19-Jun-14 4:11
mvePIEBALDconsult19-Jun-14 4:11 
SuggestionRe: C# FOR Loop Speed Issue Pin
Nathan Minier20-Jun-14 3:02
professionalNathan Minier20-Jun-14 3:02 
AnswerRe: C# FOR Loop Speed Issue Pin
V.19-Jun-14 4:13
professionalV.19-Jun-14 4:13 
QuestionFields in TFS WorkItem not able to change values Pin
hanusri18-Jun-14 7:20
hanusri18-Jun-14 7:20 
QuestionTCP connection to specific client Pin
kruegs3518-Jun-14 4:49
kruegs3518-Jun-14 4:49 
AnswerRe: TCP connection to specific client Pin
Eddy Vluggen18-Jun-14 5:15
professionalEddy Vluggen18-Jun-14 5:15 
GeneralRe: TCP connection to specific client Pin
kruegs3518-Jun-14 5:57
kruegs3518-Jun-14 5:57 
AnswerRe: TCP connection to specific client Pin
ZurdoDev18-Jun-14 8:29
professionalZurdoDev18-Jun-14 8:29 
AnswerRe: TCP connection to specific client Pin
jschell18-Jun-14 11:15
jschell18-Jun-14 11:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.