Hi
I am trying to create a paging system and came across a tutorial that included code for achieving this. However, when I run my query, it throws the quoted error. I have double checked code but cannot see error. Can someone point out my mistake. Thanks
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
I am trying to create a paging system and came across a tutorial that included code for achieving this. However, when I run my query, it throws the quoted error. I have double checked code but cannot see error. Can someone point out my mistake. Thanks
Quote:
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
Code:
Dim Row_Per_Page As Integer = 4
Dim TotRows As Integer = 17
Dim Page_Number As Integer = 2
Dim oledbCmd As OleDbCommand = New OleDbCommand("Select TOP '" & Row_Per_Page & "' *, Count(*) As '" & TotRows & "' From [Select Top('" & TotRows & "' - (('" & Page_Number & "' - 1) * '" & Row_Per_Page & "'))From Postings Order By [Date] DESC] Order By [Date] ASC", oledbCnn)