Link to home
Create AccountLog in
Avatar of IT-Ed
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]![DateTimeRecovered])) AS [Month Name], Count(Articles.ID) AS [Count Of Items Recieved]
FROM Articles WHERE (((Articles.DateTimeRecovered)>#9/30/2012 23:59:0# And (Articles.DateTimeRecovered)<#1/1/2013#))
GROUP BY Month([Articles]![DateTimeRecovered]));

Does anyone know how to convert this to an ADO.net compliant SQL statement?
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

replace the ! by a .
ASKER CERTIFIED SOLUTION
Avatar of IT-Ed
IT-Ed

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of IT-Ed
IT-Ed

ASKER

The SQL statement was fine, the error was caused by assigning incorrect string value to the actual query/dataset.