Servoy 3.5 beta 3

Release notes for Servoy betas

Postby jcompagner » Tue May 01, 2007 3:21 pm

If it does what it sounds like, it'd be really nice if it could be enhanced by

Code:
databaseManager.getFoundSet(server, table, [query], [args])


That would really allow us to create foundset of whatever sort "in the dark"...


you can do this in 3.5:

var vs = databaseManager.getFoundSet(server, table).loadRecords(query, [args])
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby patrick » Tue May 01, 2007 7:34 pm

That's very cool!! In the current beta this does not seem to work, however. Is that right or am I missing something? And: I understand right that you don't need a form based on that table at all, right?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby patrick » Tue May 01, 2007 7:34 pm

That's very cool!! In the current beta this does not seem to work, however. Is that right or am I missing something? And: I understand right that you don't need a form based on that table at all, right?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby faheemhameed » Sat May 05, 2007 6:57 am

Nice work. Thanks guys.

Now in the debug mode the codes past the showFormInDialog are not run until you close the formInDialog which is cool. But I could not debug any code while the formInDialog is on the top. I could not touch the method editor and other debug buttons there. Would be cool if this is fixes quickly.

Thanks
Hameed
Pilot simple software
Hong Kong
User avatar
faheemhameed
 
Posts: 763
Joined: Wed Sep 10, 2003 7:23 am

Postby jcompagner » Mon May 07, 2007 11:14 am

Patrick: that should already work in the latest beta of 3.5

faheemhameed: i will look at this. Maybe we maybe don't check this anymore because it is currently one of the other (so or you have a blocking dialog and can't debug it or you have a none blocking dialog and you can debug it)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby patrick » Mon May 07, 2007 11:21 am

Johan: no, at least I don't get it to work. I have a form that shows data and use this code:
Code: Select all
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
Code: Select all
var fs = databaseManager.getFoundSet(myServer, myTable)


but that resulted in the same. But something useful seems to be going on, because when I do
Code: Select all
var fs = databaseManager.getFoundSet(controller.getTableName(), controller.getServerName())


fs is null.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby jcompagner » Mon May 07, 2007 11:32 am

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

Code: Select all
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.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby patrick » Mon May 07, 2007 11:36 am

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!!
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby patrick » Mon May 07, 2007 11:46 am

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
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby jcompagner » Mon May 07, 2007 1:13 pm

in the next beta this is fixed:

Code: Select all
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
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby faheemhameed » Mon May 07, 2007 1:22 pm

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=
Hameed
Pilot simple software
Hong Kong
User avatar
faheemhameed
 
Posts: 763
Joined: Wed Sep 10, 2003 7:23 am

Re: Servoy 3.5.5

Postby amcgilly » Wed Aug 27, 2008 9:08 am

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.
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 375
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

Previous

Return to Latest Releases

Who is online

Users browsing this forum: No registered users and 15 guests