Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: ODBC Type mismatch error Pin
OriginalGriff26-Oct-09 10:02
mveOriginalGriff26-Oct-09 10:02 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude26-Oct-09 11:51
TheJudeDude26-Oct-09 11:51 
GeneralRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 12:22
sitebuilderLuc Pattyn26-Oct-09 12:22 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude26-Oct-09 13:19
TheJudeDude26-Oct-09 13:19 
GeneralRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 13:40
sitebuilderLuc Pattyn26-Oct-09 13:40 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude26-Oct-09 14:10
TheJudeDude26-Oct-09 14:10 
GeneralRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 14:18
sitebuilderLuc Pattyn26-Oct-09 14:18 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude26-Oct-09 14:42
TheJudeDude26-Oct-09 14:42 
GeneralRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 14:53
sitebuilderLuc Pattyn26-Oct-09 14:53 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude26-Oct-09 15:41
TheJudeDude26-Oct-09 15:41 
GeneralRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 15:46
sitebuilderLuc Pattyn26-Oct-09 15:46 
GeneralRe: ODBC Type mismatch error Pin
TheJudeDude27-Oct-09 3:49
TheJudeDude27-Oct-09 3:49 
AnswerRe: ODBC Type mismatch error Pin
Luc Pattyn26-Oct-09 10:05
sitebuilderLuc Pattyn26-Oct-09 10:05 
QuestionChecking required fields in a second Windows Form Pin
JTRizos26-Oct-09 8:31
JTRizos26-Oct-09 8:31 
AnswerRe: Checking required fields in a second Windows Form Pin
Not Active26-Oct-09 8:50
mentorNot Active26-Oct-09 8:50 

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.