IT-Ed
asked on
SQL Statement
Hello, I have a SQL statement that works in a VB-6 DAO based application on an access database, trying to get it to work with ado.net in VS-2010 on the same database. Database opens and simple Select SQL queries work but this one fails;
SELECT Month([Articles]![DateTime Recovered] )) AS [Month Name], Count(Articles.ID) AS [Count Of Items Recieved]
FROM Articles WHERE (((Articles.DateTimeRecove red)>#9/30 /2012 23:59:0# And (Articles.DateTimeRecovere d)<#1/1/20 13#))
GROUP BY Month([Articles]![DateTime Recovered] ));
Does anyone know how to convert this to an ADO.net compliant SQL statement?
SELECT Month([Articles]![DateTime
FROM Articles WHERE (((Articles.DateTimeRecove
GROUP BY Month([Articles]![DateTime
Does anyone know how to convert this to an ADO.net compliant SQL statement?
replace the ! by a .
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
The SQL statement was fine, the error was caused by assigning incorrect string value to the actual query/dataset.