Hi, did anyone ever came across this? I have a very complex SQL Server 2000 database And I created a bunch of complex views to make access of some information easier and have "tables" that have ROR like naming All I have to do is get information from the DB, I never have to write into it using Rails Now If I get a page (10 records by default) just original scaffold, nothing changed All the pages are the same, the number updates, but the content doesn''t differ if I change the default to 20 records, I get the 20 first records correctly, but next page gives me the same 20 records Any ever seen this and knows where I have to start looking? Thanks Geert --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Try adding an ordering to your query. The SQL Server adapter doesn''t handle pagination very well, and can fail completely where there is no ordering on the query. Tom On 10/10/06, Gertone <geert.bormans-6nMaaAoLFfKG5XvV6lv2jw@public.gmane.org> wrote:> > Hi, did anyone ever came across this? > > I have a very complex SQL Server 2000 database > And I created a bunch of complex views to > make access of some information easier > and have "tables" that have ROR like naming > > All I have to do is get information from the DB, I never have to write > into it using Rails > > Now If I get a page (10 records by default) just original scaffold, > nothing changed > All the pages are the same, the number updates, but the content doesn''t > differ > if I change the default to 20 records, I get the 20 first records > correctly, > but next page gives me the same 20 records > > Any ever seen this and knows where I have to start looking? > > Thanks > > Geert > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Yes I ran into the same problem - you need to specify ordering in the paging code. This is because SQL does not support LIMIT like MySQL. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hi guys, thank you I already saw some weird things in the SQL in the log file twice TOP isn''t rocking :-) here is my simple standard list code def list @vamp_artefact_pages, @vamp_artefacts = paginate :vamp_artefacts, :per_page => 10 end how do I order this, in the paginate methods definition? thanks for your help Geert --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
well, solution is simple aparently def list @vamp_artefact_pages, @vamp_artefacts = paginate :vamp_artefacts, :per_page => 10, :order =>"id" end I also found on http://dev.rubyonrails.org/ticket/3437 that solving this in the sql server adapter is a bit tricky Thank you both for pointing me in the right direction Geert --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---