useing TOP clause in access db with ado.net

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

how do you get the TOP clause to work in ADO.NET? I have tried this SELECT
TOP 1 NOTE FROM NOTES and that works, but soon as i raise the number past 1
it gives me the entire table back! I want the top 5 records not all of them,
how do you get this to work in ado.net with an access db.. thanks!
 
TOP is not recognized by Access/JET database engines. I suggest using a
BETWEEN clause in the WHERE clause if possible.

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Yup, you're right. JET (and SQL Server) hasn't always supported TOP, but
more recent versions do.

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

 
Back
Top