These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: how to get the limited record
PostPosted: Mon Jul 24, 2006 5:16 am 
Newbie

Joined: Mon Jul 24, 2006 4:01 am
Posts: 3
public List queryCargos(int first,int max){
Query query=getHibernateTemplate().getSessionFactory().
getCurrentSession().createQuery("from Cargo");
query.setFirstResult(0);
query.setMaxResults(10);
return query.list();
}

I use MSSQL AS DATABASE,when my application run, it comes with a errro message "there is error around 'limit'" .
I know can not use "select * from cargo limit 0,10" usage in mssql,but in mysql ,it can run.
How to get the limited record in mssql ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 10:42 am 
Newbie

Joined: Tue Jul 25, 2006 6:39 pm
Posts: 16
Location: Dallas, TX
Try reading http://forum.hibernate.org/viewtopic.php?t=961035&highlight=limit


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.