Click here to Skip to main content
15,902,189 members
Home / Discussions / C#
   

C#

 
AnswerRe: IEnumerable Min() not working as expected Pin
Dave Kreskowiak10-Feb-10 2:02
mveDave Kreskowiak10-Feb-10 2:02 
QuestionWhat is the use of e.Handled in the KeyDown event Pin
Kalvin @ Work9-Feb-10 11:04
Kalvin @ Work9-Feb-10 11:04 
AnswerRe: What is the use of e.Handled in the KeyDown event Pin
loyal ginger9-Feb-10 11:22
loyal ginger9-Feb-10 11:22 
QuestionDatagridview C# Editable combo box control. Pin
Omersayeed9-Feb-10 7:45
Omersayeed9-Feb-10 7:45 
QuestionSQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 7:42
TheJudeDude9-Feb-10 7:42 
AnswerRe: SQL select on two tables takes too long Pin
Jeremy Hutchinson9-Feb-10 8:37
professionalJeremy Hutchinson9-Feb-10 8:37 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 9:46
TheJudeDude9-Feb-10 9:46 
AnswerRe: SQL select on two tables takes too long Pin
kevinnicol9-Feb-10 8:56
kevinnicol9-Feb-10 8:56 
Is MISCITEM-DATE a DateTime or a SmallDateTime, there can often be issues when querying on columns and the optimzer decides to convert a datetime in order not to lose percision. This may be even more possible because you have the line MISCITEM-DATE <= '" + dtProcDate1.ToString("yyyy-MM-dd") + "'. I would try paramaterizing your query.

DbCommand.CommandText = 
"SELECT MISCITEM-DATE, MISCITEM-SERIAL-NBR,  INV-MK-SERIAL-NBR, MISCITEM-MODEL-NBR, MISCITEM-CUST-ACCT-NBR, MISCITEM-EXCHANGE-MODEL-NBR, " +
" INV-SELL-PRICE,INV-ORIGINAL-COST, MISCITEM-ACTUAL-COST, MISCITEM-SALESMAN-1, MISCITEM-TICKET-NBR, MISCITEM-STORE FROM MISCITEM " +
" INNER JOIN NINVREC ON MISCITEM-SERIAL-NBR=INV-MK-SERIAL-NBR " +
" WHERE (MISCITEM-DATE >= @Date1 AND MISCITEM-DATE <= @Date2) AND (INV-STATUS = 'S')" +
" GROUP BY MISCITEM-STORE, MISCITEM-DATE ORDER BY MISCITEM-STORE, MISCITEM-DATE";				

DbCommand.Paramaters.Add("@Date1", OdbcType.DateTime)
DbCommand.Paramaters["@Date1"].Value = strEOMDate;
DbCommand.Paramaters.Add("@Date2", OdbcType.DateTime)
DbCommand.Paramaters["@Date2"].Value = dtProcDate1;

try			
{
 DbConnection.Open();

 DbReader = DbCommand.ExecuteReader(); 

while(DbReader.Read())

GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 9:45
TheJudeDude9-Feb-10 9:45 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 10:02
TheJudeDude9-Feb-10 10:02 
GeneralRe: SQL select on two tables takes too long Pin
kevinnicol9-Feb-10 10:12
kevinnicol9-Feb-10 10:12 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 10:54
TheJudeDude9-Feb-10 10:54 
GeneralRe: SQL select on two tables takes too long Pin
kevinnicol10-Feb-10 2:05
kevinnicol10-Feb-10 2:05 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 11:38
TheJudeDude9-Feb-10 11:38 
GeneralRe: SQL select on two tables takes too long Pin
Mycroft Holmes9-Feb-10 18:10
professionalMycroft Holmes9-Feb-10 18:10 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude10-Feb-10 9:58
TheJudeDude10-Feb-10 9:58 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude10-Feb-10 10:42
TheJudeDude10-Feb-10 10:42 
QuestionC# Pin
jojoba20109-Feb-10 5:09
jojoba20109-Feb-10 5:09 
AnswerRe: C# Pin
Not Active9-Feb-10 5:48
mentorNot Active9-Feb-10 5:48 
QuestionRe: C# Pin
jojoba20109-Feb-10 5:50
jojoba20109-Feb-10 5:50 
AnswerRe: C# Pin
Richard MacCutchan9-Feb-10 6:21
mveRichard MacCutchan9-Feb-10 6:21 
QuestionRe: C# Pin
jojoba20109-Feb-10 6:24
jojoba20109-Feb-10 6:24 
AnswerRe: C# Pin
Richard MacCutchan9-Feb-10 7:54
mveRichard MacCutchan9-Feb-10 7:54 
AnswerRe: C# Pin
hammerstein059-Feb-10 6:24
hammerstein059-Feb-10 6:24 
QuestionRe: C# Pin
jojoba20109-Feb-10 6:32
jojoba20109-Feb-10 6:32 

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.