Dashboard > iBATIS DataMapper > Home > Frequently Asked Questions > I have a problem using "top" keyword in my select queries
I have a problem using "top" keyword in my select queries
Added by kimhj, last edited by Nicholas Piasecki on Jun 21, 2007  (view change)
Labels: 
(None)


IBatisNet  question :

My queries is like this :

    SELECT TOP #par1#  * FROM (
      SELECT SEQ, TYPE, TITLE, CONTENT, REG_ID
      FROM BOARD 
     ) NBOX_PAGING1

 

and always DataAccessException and SqlException throwned.

Is there anyone who knows selecting data with query using top keyword

 

------

I know this old, but I experienced the same problem. Use the $ sign instead of #. $ will output the string directly, whereas # is for parameters in prepared statements.


Site running on a free Atlassian Confluence Open Source Project License granted to OSS. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators