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.

Working with Multiple forms using the same DataSource and DataSet

Xailer English public forum
Responder
g.s.rogers
Mensajes: 202
Registrado: Dom Feb 17, 2008 3:35 am

Working with Multiple forms using the same DataSource and DataSet

Mensaje por g.s.rogers »

I have a form (Form #1) with a dbfBrowse object on it (with associated
DataSource and DataSet). I want to have an Add button on the form that calls
another form (Form #2) to actually add a record to the same table referenced
by the DataSource.
Can I reference the DataSet from Form #2 so I could add a record to it or
pull values from it?
Thanks,
Gary S. Rogers
g.s.rogers
Mensajes: 202
Registrado: Dom Feb 17, 2008 3:35 am

Working with Multiple forms using the same DataSource and DataSet

Mensaje por g.s.rogers »

I see in the documentation for DataControls that "In future Xailer releases
it might be that we include a special form name DataModule..." which I am
guessing addresses what I am trying to do. So, it looks like for the present
I will have to put a DataSource and DataSet component in each form, even
when one form containing those appropriate DataControls calls another form
tha will use those very same DataControls.
Correct me if I am wrong about this.
Thanks,
Gary
"Gary S. Rogers" <g.s.rogers@att.net> wrote in message
news:[email=48a1bcbf@ozsrv2.ozlan.local...]48a1bcbf@ozsrv2.ozlan.local...[/email]
>I have a form (Form #1) with a dbfBrowse object on it (with associated
>DataSource and DataSet). I want to have an Add button on the form that
>calls another form (Form #2) to actually add a record to the same table
>referenced by the DataSource.
>
> Can I reference the DataSet from Form #2 so I could add a record to it or
> pull values from it?
>
> Thanks,
> Gary S. Rogers
g.s.rogers
Mensajes: 202
Registrado: Dom Feb 17, 2008 3:35 am

Working with Multiple forms using the same DataSource and DataSet

Mensaje por g.s.rogers »

When I create one form using a datasource and dataset which identifies one
dbf and two indexes and put a dbfBrowse object on it, then call a second
form with its own datasource and dataset pointing to the same dbf and two
indexes and use AddNew() on that second form, when I close it and go back to
Form #1 I see the record I added, but it is not in indexed order. If I
reindex the file, it displays properly, so I know that the index file itself
is keyed right. I've tried refreshing the dbfBrowse object, issuing a
GoTop() command, etc., but the record does not display in its proper place
until I reindex the dbf. It seems to me that the dataset on Form #2 is not
updating the controlling index properly.
What am I missing?
Gary
"Gary S. Rogers" <g.s.rogers@att.net> wrote in message
news:48a62089$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>I see in the documentation for DataControls that "In future Xailer releases
>it might be that we include a special form name DataModule..." which I am
>guessing addresses what I am trying to do. So, it looks like for the
>present I will have to put a DataSource and DataSet component in each form,
>even when one form containing those appropriate DataControls calls another
>form tha will use those very same DataControls.
>
> Correct me if I am wrong about this.
>
> Thanks,
> Gary
>
> "Gary S. Rogers" <g.s.rogers@att.net> wrote in message
> news:[email=48a1bcbf@ozsrv2.ozlan.local...]48a1bcbf@ozsrv2.ozlan.local...[/email]
>>I have a form (Form #1) with a dbfBrowse object on it (with associated
>>DataSource and DataSet). I want to have an Add button on the form that
>>calls another form (Form #2) to actually add a record to the same table
>>referenced by the DataSource.
>>
>> Can I reference the DataSet from Form #2 so I could add a record to it or
>> pull values from it?
>>
>> Thanks,
>> Gary S. Rogers
>
g.s.rogers
Mensajes: 202
Registrado: Dom Feb 17, 2008 3:35 am

Working with Multiple forms using the same DataSource and DataSet

Mensaje por g.s.rogers »

I've progressed to creating a page frame on Form #1 and switching between a
page for browse display and a page for data entry/editing. This seems to
work fine in terms of updating the browse object. I would be interested if
anyone can tell me a way to have the same dataset open on two different
forms and to keep them synchronized.
Gary
"Gary S. Rogers" <g.s.rogers@att.net> wrote in message
news:48a62713$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> When I create one form using a datasource and dataset which identifies one
> dbf and two indexes and put a dbfBrowse object on it, then call a second
> form with its own datasource and dataset pointing to the same dbf and two
> indexes and use AddNew() on that second form, when I close it and go back
> to Form #1 I see the record I added, but it is not in indexed order. If I
> reindex the file, it displays properly, so I know that the index file
> itself is keyed right. I've tried refreshing the dbfBrowse object, issuing
> a GoTop() command, etc., but the record does not display in its proper
> place until I reindex the dbf. It seems to me that the dataset on Form #2
> is not updating the controlling index properly.
>
> What am I missing?
>
> Gary
>
> "Gary S. Rogers" <g.s.rogers@att.net> wrote in message
> news:48a62089$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>>I see in the documentation for DataControls that "In future Xailer
>>releases it might be that we include a special form name DataModule..."
>>which I am guessing addresses what I am trying to do. So, it looks like
>>for the present I will have to put a DataSource and DataSet component in
>>each form, even when one form containing those appropriate DataControls
>>calls another form tha will use those very same DataControls.
>>
>> Correct me if I am wrong about this.
>>
>> Thanks,
>> Gary
>>
>> "Gary S. Rogers" <g.s.rogers@att.net> wrote in message
>> news:[email=48a1bcbf@ozsrv2.ozlan.local...]48a1bcbf@ozsrv2.ozlan.local...[/email]
>>>I have a form (Form #1) with a dbfBrowse object on it (with associated
>>>DataSource and DataSet). I want to have an Add button on the form that
>>>calls another form (Form #2) to actually add a record to the same table
>>>referenced by the DataSource.
>>>
>>> Can I reference the DataSet from Form #2 so I could add a record to it
>>> or pull values from it?
>>>
>>> Thanks,
>>> Gary S. Rogers
>>
>
Responder