go to last record

Questions, tips and tricks and techniques for scripting in Servoy

go to last record

Postby Hans Nieuwenhuis » Tue Jul 31, 2012 2:48 pm

in the servoy framework the following code is used to go to the last record :

Code: Select all
vNewIndex = databaseManager.getFoundSetCount(forms[vFormName].foundset)
// go to record
forms[vFormName].foundset.getRecord(vNewIndex)
forms[vFormName].controller.setSelectedIndex(vNewIndex);


This works fine in 5.1.x, but not in 6.1

It seems that not all records are loaded ( only the first 200 ).
Even adding forms[vFormName].foundset.loadAllRecords() does not help

Is there a reason this does not work in 6.1 ?

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: go to last record

Postby omar » Tue Jul 31, 2012 3:14 pm

Hi Hans,

Looks like a bug indeed. The problem is in the getRecord() method. It doesn't return a record and doesn't pull data into the foundset as it normally should (tested it on the example_data\order_details table).
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 340
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: go to last record

Postby Hans Nieuwenhuis » Tue Jul 31, 2012 8:14 pm

created a case for this : SVY-2788
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 2 guests

cron