Click here to Skip to main content
15,894,460 members
Home / Discussions / C#
   

C#

 
GeneralRe: Function Key assignment in a Form C# .Net Pin
Zar Ni26-Oct-09 16:06
Zar Ni26-Oct-09 16:06 
AnswerRe: Function Key assignment in a Form C# .Net Pin
Christian Graus26-Oct-09 15:54
protectorChristian Graus26-Oct-09 15:54 
GeneralRe: Function Key assignment in a Form C# .Net Pin
Zar Ni26-Oct-09 16:03
Zar Ni26-Oct-09 16:03 
GeneralRe: Function Key assignment in a Form C# .Net Pin
Christian Graus26-Oct-09 16:09
protectorChristian Graus26-Oct-09 16:09 
GeneralRe: Function Key assignment in a Form C# .Net Pin
Zar Ni26-Oct-09 16:07
Zar Ni26-Oct-09 16:07 
QuestionNested pinning? Pin
DaveyM6926-Oct-09 11:56
professionalDaveyM6926-Oct-09 11:56 
AnswerRe: Nested pinning? Pin
Luc Pattyn26-Oct-09 12:17
sitebuilderLuc Pattyn26-Oct-09 12:17 
GeneralRe: Nested pinning? Pin
DaveyM6926-Oct-09 13:18
professionalDaveyM6926-Oct-09 13:18 
GeneralRe: Nested pinning? Pin
Luc Pattyn26-Oct-09 13:31
sitebuilderLuc Pattyn26-Oct-09 13:31 
GeneralRe: Nested pinning? Pin
DaveyM6926-Oct-09 13:41
professionalDaveyM6926-Oct-09 13:41 
GeneralRe: Nested pinning? Pin
Luc Pattyn26-Oct-09 13:52
sitebuilderLuc Pattyn26-Oct-09 13:52 
GeneralRe: Nested pinning? Pin
DaveyM6926-Oct-09 13:57
professionalDaveyM6926-Oct-09 13:57 
GeneralRe: Nested pinning? Pin
Luc Pattyn26-Oct-09 13:59
sitebuilderLuc Pattyn26-Oct-09 13:59 
GeneralRe: Nested pinning? Pin
DaveyM6926-Oct-09 22:22
professionalDaveyM6926-Oct-09 22:22 
GeneralRe: Nested pinning? Pin
Luc Pattyn27-Oct-09 3:21
sitebuilderLuc Pattyn27-Oct-09 3:21 
QuestionWeb Reference in VS incorrectly reads array parameter Pin
Vengeance26-Oct-09 11:20
Vengeance26-Oct-09 11:20 
QuestionMultiple Components In One Solution Accessing Data Pin
Kevin Marois26-Oct-09 10:46
professionalKevin Marois26-Oct-09 10:46 
AnswerRe: Multiple Components In One Solution Accessing Data Pin
Not Active26-Oct-09 11:32
mentorNot Active26-Oct-09 11:32 
GeneralRe: Multiple Components In One Solution Accessing Data Pin
Kevin Marois26-Oct-09 12:29
professionalKevin Marois26-Oct-09 12:29 
GeneralRe: Multiple Components In One Solution Accessing Data Pin
Not Active26-Oct-09 12:43
mentorNot Active26-Oct-09 12:43 
QuestionDetailsView returns null values on postback?? Pin
je198026-Oct-09 10:41
je198026-Oct-09 10:41 
AnswerRe: DetailsView returns null values on postback?? Pin
Not Active26-Oct-09 11:15
mentorNot Active26-Oct-09 11:15 
QuestionODBC Type mismatch error Pin
TheJudeDude26-Oct-09 9:25
TheJudeDude26-Oct-09 9:25 
I am running a SQL statement in C#, where I am using the WHERE clause to limit a query to a date.
Here's the SQL:
DbCommand.CommandText = "SELECT SUM-DATE, SUM-STORE, SUM(SUM-RETURNS) FROM SUMMARY WHERE SUM-DATE = '" + dtProcDate + "' GROUP BY SUM-STORE"; 



The dtProcDate is assigned here:
if (DateTime.Now.DayOfWeek == DayOfWeek.Monday)
			{
				dtProcDate = DateTime.Now.AddDays(-2);
			}
			else
			{
				dtProcDate = DateTime.Now.AddDays(-1);
			}

When I query just the date, I get the date in the MM/DD/YYYY HH:MM:SS AM/PM format, which is what dtProcDate shows as it's format also.

Here is the Error:
ERROR [HY000] Data Type Mismatch in WHERE clause, Value '10/24/2009 2:22:39 PM'.



What am I missing here?

Jude

AnswerRe: ODBC Type mismatch error Pin
Abhishek Sur26-Oct-09 10:01
professionalAbhishek Sur26-Oct-09 10:01 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude26-Oct-09 11:46
TheJudeDude26-Oct-09 11:46 

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.