Click here to Skip to main content
15,893,266 members
Home / Discussions / C#
   

C#

 
AnswerRe: Rss Pin
Arun Jacob9-Feb-10 19:13
Arun Jacob9-Feb-10 19:13 
AnswerRe: Rss Pin
Giorgi Dalakishvili9-Feb-10 19:32
mentorGiorgi Dalakishvili9-Feb-10 19:32 
QuestionIEnumerable Min() not working as expected Pin
Member 39190499-Feb-10 16:43
Member 39190499-Feb-10 16:43 
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 
I have two tables on a database where I need to gather information for a report. I have built a select statement and run it through an Odbc.DataReader. Stepping through the debugger, once ExecuteReader is executed the program stalls, for a period of minutes. Is there anyway to make this select statement more efficient?

The fields that start with INV are in the NINVREC table. The fields that start with MISCITEM are in the MISCITEM table.
The matching keys are MISCITEM-SERIAL-NBR and INV-MK-SERIAL-NBR.

The database is read only.

OdbcDataReader DbReader;
			OdbcConnection DbConnection = new OdbcConnection("DSN=rsss");
			OdbcCommand DbCommand = DbConnection.CreateCommand();
			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 >= '" + strEOMDate + "' AND MISCITEM-DATE <= '" + dtProcDate1.ToString("yyyy-MM-dd") + "') AND (INV-STATUS = 'S')" + 
				" GROUP BY MISCITEM-STORE, MISCITEM-DATE ORDER BY MISCITEM-STORE, MISCITEM-DATE";	

			try
			{
				DbConnection.Open();
				DbReader = DbCommand.ExecuteReader(); //stalls here
				while(DbReader.Read())
Jude

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 
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 

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.