Click here to Skip to main content
16,016,204 members
Home / Discussions / C#
   

C#

 
GeneralRe: Error Code 17 from RegReplaceKey ?? Pin
Richard MacCutchan25-Feb-10 21:47
mveRichard MacCutchan25-Feb-10 21:47 
QuestionReduce the form load time Pin
Hum Dum23-Feb-10 19:19
Hum Dum23-Feb-10 19:19 
AnswerRe: Reduce the form load time Pin
Saksida Bojan23-Feb-10 19:34
Saksida Bojan23-Feb-10 19:34 
GeneralRe: Reduce the form load time Pin
Hum Dum23-Feb-10 19:41
Hum Dum23-Feb-10 19:41 
GeneralRe: Reduce the form load time Pin
Saksida Bojan23-Feb-10 20:46
Saksida Bojan23-Feb-10 20:46 
GeneralRe: Reduce the form load time Pin
Hum Dum23-Feb-10 22:09
Hum Dum23-Feb-10 22:09 
GeneralRe: Reduce the form load time Pin
Saksida Bojan24-Feb-10 0:42
Saksida Bojan24-Feb-10 0:42 
AnswerRe: Reduce the form load time Pin
David Skelly23-Feb-10 22:43
David Skelly23-Feb-10 22:43 
I can think of two things you might try:

1. Instead of creating and executing the Sum(Quantity) queries every time through the loop, create them once as prepared statements then simply set the parameters each time. That should reduce the amount of work the database has to do and it should go noticeably faster for relatively little code changes.

2. Depending on how strong your SQL skills are, you could combine the queries together into a single query which gives you the data you need all in one go. That way, the database is doing the work of joining the tables together which you are currently doing in your foreach loop, and databases are designed to do that sort of thing efficiently.
Questionwindows forms key board for other application Pin
nayana.r.r23-Feb-10 19:12
nayana.r.r23-Feb-10 19:12 
AnswerRe: windows forms key board for other application Pin
Gopal.S23-Feb-10 23:08
Gopal.S23-Feb-10 23:08 
QuestionParental Control Pin
satsumatable23-Feb-10 19:07
satsumatable23-Feb-10 19:07 
AnswerRe: Parental Control Pin
Pascal Ganaye17-Jun-10 10:16
Pascal Ganaye17-Jun-10 10:16 
QuestionSend and receive sms in .net cf Pin
abalbo23-Feb-10 18:53
abalbo23-Feb-10 18:53 
AnswerRe: Send and receive sms in .net cf Pin
rickyjos23-Feb-10 19:09
rickyjos23-Feb-10 19:09 
QuestionC# array Pin
Iman Mohtashemi23-Feb-10 18:14
Iman Mohtashemi23-Feb-10 18:14 
AnswerRe: C# array Pin
Saksida Bojan23-Feb-10 19:29
Saksida Bojan23-Feb-10 19:29 
AnswerRe: C# array Pin
RichardM123-Feb-10 19:50
RichardM123-Feb-10 19:50 
QuestionAd insertion technique Pin
booota23-Feb-10 17:54
booota23-Feb-10 17:54 
AnswerRe: Ad insertion technique Pin
AspDotNetDev23-Feb-10 17:58
protectorAspDotNetDev23-Feb-10 17:58 
QuestionRe: Ad insertion technique Pin
booota24-Feb-10 19:24
booota24-Feb-10 19:24 
AnswerRe: Ad insertion technique Pin
AspDotNetDev24-Feb-10 19:35
protectorAspDotNetDev24-Feb-10 19:35 
QuestionWINDOWS FORM Pin
Aillish23-Feb-10 16:17
Aillish23-Feb-10 16:17 
AnswerRe: WINDOWS FORM Pin
Luc Pattyn23-Feb-10 16:36
sitebuilderLuc Pattyn23-Feb-10 16:36 
GeneralRe: WINDOWS FORM Pin
RichardM123-Feb-10 19:08
RichardM123-Feb-10 19:08 
AnswerRe: WINDOWS FORM Pin
Roger Wright23-Feb-10 19:57
professionalRoger Wright23-Feb-10 19:57 

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.