In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Datasource Question

Xailer English public forum
Responder
awr
Mensajes: 26
Registrado: Mar Jul 25, 2006 11:16 pm

Datasource Question

Mensaje por awr »

I have a application Window that contains a browse on a table. When I click
an "Edit" button (this is in my application) I want another dialog to appear
with the detailed edit fields for the highlighted browse line -- pretty
standard stuff. So far no problems. I've used some samples in the samples
folder that have greatly helped me understand how to get this far.
What I don't know how to do is assign a Global ADS Datasource that appears
in every child form I create. I put the field name in one of the TDBMaskEdit
(even tried TDBEdit) and nothing appears. I see the oDataSet property, but
everything I put in there disappears. I've tried creating a dummy
TAdsDataSource on the Form (child dialog) Components list and assigning the
global datasource ( the one I create at application start up that verifies
the data dictionary version and opens all the tables ) to that at the Form
Create event, but I cannot get the name to stay in the oDataSet property of
the edit field.
awr
Mensajes: 26
Registrado: Mar Jul 25, 2006 11:16 pm

Datasource Question

Mensaje por awr »

Follow up:
I've noticed in some samples that there is this "kind" of thing (show below)
going on in the Create event of *every* edit field:
oSender:oDataSet := Application:oMainForm:oDbf
I can't imagine that I need to do that for every field. There must be some
other way to inherit a DataSet and expose that to the property sheet for
each field.
"Andrew W. Ross" <awr@jps.net> wrote in message
news:[email=44c7ce1e@news.xailer.com...]44c7ce1e@news.xailer.com...[/email]
>I have a application Window that contains a browse on a table. When I click
>an "Edit" button (this is in my application) I want another dialog to
>appear with the detailed edit fields for the highlighted browse line --
>pretty standard stuff. So far no problems. I've used some samples in the
>samples folder that have greatly helped me understand how to get this far.
>
> What I don't know how to do is assign a Global ADS Datasource that appears
> in every child form I create. I put the field name in one of the
> TDBMaskEdit (even tried TDBEdit) and nothing appears. I see the oDataSet
> property, but everything I put in there disappears. I've tried creating a
> dummy TAdsDataSource on the Form (child dialog) Components list and
> assigning the global datasource ( the one I create at application start up
> that verifies the data dictionary version and opens all the tables ) to
> that at the Form Create event, but I cannot get the name to stay in the
> oDataSet property of the edit field.
>
>
>
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Datasource Question

Mensaje por jfgimenez »

Andrew,
> I've noticed in some samples that there is this "kind" of thing (show
> below) going on in the Create event of *every* edit field:
>
> oSender:oDataSet := Application:oMainForm:oDbf
>
> I can't imagine that I need to do that for every field. There must be some
> other way to inherit a DataSet and expose that to the property sheet for
> each field.
For now, you can do that way. Also, there is another way: create a dataset
in your form, and assign it from the global one in its OnCreate event.
In the near future (I hope very soon), there will be a special form called
probably 'datamodule', which will allow to drop into it any kind of
component that will be available in the whole project. So, when you open the
list of a oDataSet property, it will show the datasets of the same form and
the datasets from that 'datamodule'.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
awr
Mensajes: 26
Registrado: Mar Jul 25, 2006 11:16 pm

Datasource Question

Mensaje por awr »

<< In the near future (I hope very soon), there will be a special form
called probably 'datamodule', which will allow to drop into it any kind of
component that will be available in the whole project. So, when you open the
list of a oDataSet property, it will show the datasets of the same form and
the datasets from that 'datamodule'. >>
Perfect, that's what I was hoping for. I once used Delphi 3 years ago for a
project and I believe it had a similar "global container."
Responder