how can I select the last 700 entry in my access databse? I'm using this
private string strsqlcommandBeta = "select top 700 * from objectaer " +
" order by objectdate desc" +
" ";
but I'm getting this error
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
Try "Limit 700" at the end
Typically this is a result of using a keyword as a field name in one of your tables, or as an alias in your query. If you don't "quote" the keyword-as-a-field-name with
[]
you'll get an error.Although I can't see any keywords being used inappropriately in your query, try this:
It's also possible that the problem is not with your query, rather if
objectaer
is a query object you've created in Access that contains incorrect syntax, you're likely seeing the error forobjectaer
instead.