Form based on a SQL

Hi.

I need to show a couple of table view form based on a SQL. One of them is going to be shown in a tabpanel, while the other one will be shown in a dialog form.

What is the way to get this for each of them?

Using Servoy 6 alpha 1

Thanks in advance

jasantana,

Have a look at dataset.createDataSource(), you can create a data source from a dataset and build a form using solution model on that.

http://wiki.servoy.com/display/public/D … DataSource

Note that in Servoy 6.0 (introduced in beta1) we have added a shortcut method on databaseManager: createDataSourceByQuery()
It will do the same as getDatasetByQuery() + dataset.createDataSource(), except it does not go from server->client->server.
The data will be selected on the server and kept in memory there, only the data shown in the form is sent to the client.

Rob

Thanks for your reply Rob.

And how to use it? Create it in the onLoad event of the form?

Could you give me some guide please?

Thanks.

Tying a datasource to a form can be done through the solutionModel only.

Paul

Note that in Servoy 6.0 (introduced in beta1) we have added a shortcut method on databaseManager: createDataSourceByQuery()
It will do the same as getDatasetByQuery() + dataset.createDataSource(), except it does not go from server->client->server.
The data will be selected on the server and kept in memory there, only the data shown in the form is sent to the client.

Sweet! I am looking forward to replacing all our older 2-step methods with the new one. More importantly, it removes the data manipulation from the client and puts it where it belongs…on the server! Way to go Servoy!