Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Feb 12, 2012 03:32 PM|LINK
var data = db.Query("SELECT Date, XAG FROM metals WHERE Data BETWEEN '@StartDate' AND '@EndDate'");
That should be
var data = db.Query("SELECT Date, XAG FROM metals WHERE Data BETWEEN @0 AND @1");
The Database helper parameter markers are numbers starting from 0 onwards. Named parameters won't work, and they won't work with any database provider if they are between single quotes. That turns them into literal strings.