Servoy 3.5 beta 3

Johan: no, at least I don’t get it to work. I have a form that shows data and use this code:

var fs = databaseManager.getFoundSet(controller.getServerName(), controller.getTableName())
var record = fs.getRecord(1)

in the debugger, fs looks empty (not null, but empty string). record evaluates to null.

As far as I understand, a form (and a controller) is not needed at all, right? At first I tried

var fs = databaseManager.getFoundSet(myServer, myTable)

but that resulted in the same. But something useful seems to be going on, because when I do

var fs = databaseManager.getFoundSet(controller.getTableName(), controller.getServerName())

fs is null.

patrick: i thought we talked that you could do loadRecords()
but looking at your code you don’t do that

var fs = databaseManager.getFoundSet(controller.getServerName(), controller.getTableName())
fs.loadAllRecords();
var record = fs.getRecord(1)

that works fine. You get a completely empty foundset you need to do find or loadRecords first before you can get records out of it.

Excellent! Thanks for clarification and it works like a charm! The only thing that doesn’t seem to work is this

var fs = databaseManager.getFoundSet(controller.getServerName(), controller.getTableName()).loadAllRecords();

Great functionality!!

I played with this now:

var vQuery = …
var fs = databaseManager.getFoundSet(‘myServer’, ‘myTable’)
foundset.loadRecords(vQuery); // works form based
fs.loadRecords(vQuery); // does not work
fs.loadAllRecords(); // does work

in the next beta this is fixed:

var fs = databaseManager.getFoundSet(controller.getServerName(), controller.getTableName())
fs.loadRecords("select categories.categoryid from categories order by categories.categoryname");
var record = fs.getRecord(1)

faheemhameed: also the modal dialog debug behavior we have i 3.1 is back in 3.5. We will only be able to fix this completley for servoy 4.0

Thanks Johan. I can wait for this. This is not very critical for me now.

But could please… help with the following issues (these are critical for me):

could not export solution
http://forum.servoy.com/viewtopic.php?t=8273&highlight=

connecting to multi developer repository
http://forum.servoy.com/viewtopic.php?t=8272&highlight=

Servoy 3.5.5 WinXP:

I create a foundset using

var fs - databaseManager.getFoundSet(…)
fs.loadAllRecords()

then I do this:

fs.setSelectedIndex(200)

I expect it to load the next 200 records into the foundset but it doesn’t. I was expecting it to behave the same way as a controller-based foundset. Is there some reason it doesn’t?

I note that if I do this:

fs.getRecord(200)

it DOES load in the next 200 records.