Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Question on defining datasets ?
Thu, Sep 3 2015 7:46 AMPermanent Link

kamran

Hi All

I just need some clarification as to what is the best way forward with defining datasets.

In delphi I normally have a form called data where I define all my databases and refer to that page when
I need to access them from any other unit by the use clause.

1. Is that also possible in web builder ?

2. Surely I don't need to define the database I use on the form where its used. I must be able to refer to it from another page ?

The reason I ask is that when you define a grid on a page, you assign a dataset to it.
But how do you assign a dataset to it if its defined on another page?
Maybe I am missing something here as it does not show in the dataset list unless  it is dropped on the very same page?

Thanks for any clarification and methods you may have of best practice when using multiple datasets across
multiple screens.

Kind regards

Kamran
Thu, Sep 3 2015 8:05 AMPermanent Link

Uli Becker

Kamran,

> In delphi I normally have a form called data where I define all my databases and refer to that page when
> I need to access them from any other unit by the use clause.
> 1. Is that also possible in web builder ?

There is no equivalent to Delphi's datamodule in EWB, but of course you
can use any (invisible) form to store your datasets.

> 2. Surely I don't need to define the database I use on the form where its used. I must be able to refer to it from another page ?
> The reason I ask is that when you define a grid on a page, you assign a dataset to it.
> But how do you assign a dataset to it if its defined on another page?

With the current version you can't do so at design time. But no problem
to assign any dataset to any control at runtime.
As a workaround to populate a grid's columns e.g., you can place the
dataset on the "target" form, setup the grid and finally move the
dataset to your custom "datamodule" form. Just a workaround though.

Uli



Thu, Sep 3 2015 3:12 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kamran,

< In delphi I normally have a form called data where I define all my databases and refer to that page when
I need to access them from any other unit by the use clause. >.

Something like that is coming in EWB 2, but it's not here yet.  Essentially, an application's database will be available as a special designer that can be accessed at design-time.  At that point, you'll be able to reference datasets in the database from multiple forms.

Tim Young
Elevate Software
www.elevatesoft.com
Image