Question on Select Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to perform paging in my .NET application, which use Access as the
backing store. So, I create a Select Query similar to this:

Parameters PageSize Short, LastRecordId Long;
Select Top PageSize ......

However, Access throws an error saying that the syntax is incorrect. If I
change it to:

Select Top 10 ....

then, there's no error at all. Anybody knows why ?

Thanks.
 
Just to clarify: the TOP value canNOT be a Parameter. It must be an
explicit number in the SQL String.

That points to one solution which is to construct your SQL String on the go
and use the SQL String rather than the Query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top