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.

DataSet:Close()

Xailer professional forum in English
Responder
Aguiar Costa
Mensajes: 115
Registrado: Jue Jun 01, 2006 7:21 pm

DataSet:Close()

Mensaje por Aguiar Costa »

Hello !!!
I have a DbfDataset that i use to open a table A or a table B as the user
shooses one or another...To do that i close the Dataset, change the table
name and open it again. It works. The problem is that although the name and
records of the table is changed the DbfDataset:aFields is never changed. To
solve this I had to destroy the Dataset object ( :End() ) and create it
again.
Attached is a sample that shows that Dataset:aFields is allways the same.
Is this the normal behavior ?
TIA.
Aguiar !!!


Attached files DataSet.zip (2.1 KB)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9259
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

DataSet:Close()

Mensaje por ignacio »

Aguiar,
That is completely normal. Is the standard behaviour. The fact that the
DataSet is closed it does not mean is completely destroyed.
Regards,
"Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
> Hello !!!
>
> I have a DbfDataset that i use to open a table A or a table B as the user
> shooses one or another...To do that i close the Dataset, change the table
> name and open it again. It works. The problem is that although the name
> and records of the table is changed the DbfDataset:aFields is never
> changed. To solve this I had to destroy the Dataset object ( :End() ) and
> create it again.
> Attached is a sample that shows that Dataset:aFields is allways the same.
> Is this the normal behavior ?
> TIA.
> Aguiar !!!
>
>
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

DataSet:Close()

Mensaje por NoName »

Aguiar,
That is completely normal. Is the standard behaviour. The fact that the
DataSet is closed it does not mean is completely destroyed.
Regards,
"Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
> Hello !!!
>
> I have a DbfDataset that i use to open a table A or a table B as the user
> shooses one or another...To do that i close the Dataset, change the table
> name and open it again. It works. The problem is that although the name
> and records of the table is changed the DbfDataset:aFields is never
> changed. To solve this I had to destroy the Dataset object ( :End() ) and
> create it again.
> Attached is a sample that shows that Dataset:aFields is allways the same.
> Is this the normal behavior ?
> TIA.
> Aguiar !!!
>
>
Aguiar Costa
Mensajes: 115
Registrado: Jue Jun 01, 2006 7:21 pm

DataSet:Close()

Mensaje por Aguiar Costa »

Ignacio,
But if the Dataset table is changed, shouldn't the fields related to it be
changed automatically ?
When the Dataset is set to open what's the logic of having :aFields with the
content of another table ??? ...maybe it should generate an error !!!
Regards.
Aguiar !!!
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
news:44c47b01$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Aguiar,
>
> That is completely normal. Is the standard behaviour. The fact that the
> DataSet is closed it does not mean is completely destroyed.
>
> Regards,
>
> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
> news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
>> Hello !!!
>>
>> I have a DbfDataset that i use to open a table A or a table B as the user
>> shooses one or another...To do that i close the Dataset, change the table
>> name and open it again. It works. The problem is that although the name
>> and records of the table is changed the DbfDataset:aFields is never
>> changed. To solve this I had to destroy the Dataset object ( :End() ) and
>> create it again.
>> Attached is a sample that shows that Dataset:aFields is allways the same.
>> Is this the normal behavior ?
>> TIA.
>> Aguiar !!!
>>
>>
>
>
>
Aguiar Costa
Mensajes: 115
Registrado: Jue Jun 01, 2006 7:21 pm

DataSet:Close()

Mensaje por Aguiar Costa »

Ignacio,
But if the Dataset table is changed, shouldn't the fields related to it be
changed automatically ?
When the Dataset is set to open what's the logic of having :aFields with the
content of another table ??? ...maybe it should generate an error !!!
Regards.
Aguiar !!!
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
news:44c47b01$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Aguiar,
>
> That is completely normal. Is the standard behaviour. The fact that the
> DataSet is closed it does not mean is completely destroyed.
>
> Regards,
>
> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
> news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
>> Hello !!!
>>
>> I have a DbfDataset that i use to open a table A or a table B as the user
>> shooses one or another...To do that i close the Dataset, change the table
>> name and open it again. It works. The problem is that although the name
>> and records of the table is changed the DbfDataset:aFields is never
>> changed. To solve this I had to destroy the Dataset object ( :End() ) and
>> create it again.
>> Attached is a sample that shows that Dataset:aFields is allways the same.
>> Is this the normal behavior ?
>> TIA.
>> Aguiar !!!
>>
>>
>
>
>
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9259
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

DataSet:Close()

Mensaje por ignacio »

Aguiar,
If you change the dataset table name you should destroy de DataSet first
with the Destroy() method
I am not sure if we should completely reset the DataSet when its table name
is changed, since you will also lose any calculated field for example. I
prefer to leave it how it is. Suppose the new table has the same structure
that the old one (very usual I am afraid). In that case for sure you will
not want to lose that information, ans some other users will complain about
it.
Regards,
"Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
news:44c48b4c$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Ignacio,
>
> But if the Dataset table is changed, shouldn't the fields related to it be
> changed automatically ?
> When the Dataset is set to open what's the logic of having :aFields with
> the content of another table ??? ...maybe it should generate an error !!!
> Regards.
> Aguiar !!!
>
> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
> news:44c47b01$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>> Aguiar,
>>
>> That is completely normal. Is the standard behaviour. The fact that the
>> DataSet is closed it does not mean is completely destroyed.
>>
>> Regards,
>>
>> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
>> news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
>>> Hello !!!
>>>
>>> I have a DbfDataset that i use to open a table A or a table B as the
>>> user shooses one or another...To do that i close the Dataset, change the
>>> table name and open it again. It works. The problem is that although the
>>> name and records of the table is changed the DbfDataset:aFields is never
>>> changed. To solve this I had to destroy the Dataset object ( :End() )
>>> and create it again.
>>> Attached is a sample that shows that Dataset:aFields is allways the
>>> same.
>>> Is this the normal behavior ?
>>> TIA.
>>> Aguiar !!!
>>>
>>>
>>
>>
>>
>
>
>
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

DataSet:Close()

Mensaje por NoName »

Aguiar,
If you change the dataset table name you should destroy de DataSet first
with the Destroy() method
I am not sure if we should completely reset the DataSet when its table name
is changed, since you will also lose any calculated field for example. I
prefer to leave it how it is. Suppose the new table has the same structure
that the old one (very usual I am afraid). In that case for sure you will
not want to lose that information, ans some other users will complain about
it.
Regards,
"Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
news:44c48b4c$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Ignacio,
>
> But if the Dataset table is changed, shouldn't the fields related to it be
> changed automatically ?
> When the Dataset is set to open what's the logic of having :aFields with
> the content of another table ??? ...maybe it should generate an error !!!
> Regards.
> Aguiar !!!
>
> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
> news:44c47b01$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>> Aguiar,
>>
>> That is completely normal. Is the standard behaviour. The fact that the
>> DataSet is closed it does not mean is completely destroyed.
>>
>> Regards,
>>
>> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
>> news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
>>> Hello !!!
>>>
>>> I have a DbfDataset that i use to open a table A or a table B as the
>>> user shooses one or another...To do that i close the Dataset, change the
>>> table name and open it again. It works. The problem is that although the
>>> name and records of the table is changed the DbfDataset:aFields is never
>>> changed. To solve this I had to destroy the Dataset object ( :End() )
>>> and create it again.
>>> Attached is a sample that shows that Dataset:aFields is allways the
>>> same.
>>> Is this the normal behavior ?
>>> TIA.
>>> Aguiar !!!
>>>
>>>
>>
>>
>>
>
>
>
Aguiar Costa
Mensajes: 115
Registrado: Jue Jun 01, 2006 7:21 pm

DataSet:Close()

Mensaje por Aguiar Costa »

Ignacio,
I understand that. It just took me a lot of time to see what was happening.
Maybe this should be stressed out in the help files.
Thanks.
Aguiar !!!
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
news:44c494ed$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Aguiar,
>
> If you change the dataset table name you should destroy de DataSet first
> with the Destroy() method
>
> I am not sure if we should completely reset the DataSet when its table
> name is changed, since you will also lose any calculated field for
> example. I prefer to leave it how it is. Suppose the new table has the
> same structure that the old one (very usual I am afraid). In that case for
> sure you will not want to lose that information, ans some other users will
> complain about it.
>
> Regards,
>
> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
> news:44c48b4c$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>> Ignacio,
>>
>> But if the Dataset table is changed, shouldn't the fields related to it
>> be changed automatically ?
>> When the Dataset is set to open what's the logic of having :aFields with
>> the content of another table ??? ...maybe it should generate an error !!!
>> Regards.
>> Aguiar !!!
>>
>> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
>> news:44c47b01$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>> Aguiar,
>>>
>>> That is completely normal. Is the standard behaviour. The fact that the
>>> DataSet is closed it does not mean is completely destroyed.
>>>
>>> Regards,
>>>
>>> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
>>> news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
>>>> Hello !!!
>>>>
>>>> I have a DbfDataset that i use to open a table A or a table B as the
>>>> user shooses one or another...To do that i close the Dataset, change
>>>> the table name and open it again. It works. The problem is that
>>>> although the name and records of the table is changed the
>>>> DbfDataset:aFields is never changed. To solve this I had to destroy the
>>>> Dataset object ( :End() ) and create it again.
>>>> Attached is a sample that shows that Dataset:aFields is allways the
>>>> same.
>>>> Is this the normal behavior ?
>>>> TIA.
>>>> Aguiar !!!
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
Aguiar Costa
Mensajes: 115
Registrado: Jue Jun 01, 2006 7:21 pm

DataSet:Close()

Mensaje por Aguiar Costa »

Ignacio,
I understand that. It just took me a lot of time to see what was happening.
Maybe this should be stressed out in the help files.
Thanks.
Aguiar !!!
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
news:44c494ed$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
> Aguiar,
>
> If you change the dataset table name you should destroy de DataSet first
> with the Destroy() method
>
> I am not sure if we should completely reset the DataSet when its table
> name is changed, since you will also lose any calculated field for
> example. I prefer to leave it how it is. Suppose the new table has the
> same structure that the old one (very usual I am afraid). In that case for
> sure you will not want to lose that information, ans some other users will
> complain about it.
>
> Regards,
>
> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
> news:44c48b4c$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>> Ignacio,
>>
>> But if the Dataset table is changed, shouldn't the fields related to it
>> be changed automatically ?
>> When the Dataset is set to open what's the logic of having :aFields with
>> the content of another table ??? ...maybe it should generate an error !!!
>> Regards.
>> Aguiar !!!
>>
>> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
>> news:44c47b01$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>> Aguiar,
>>>
>>> That is completely normal. Is the standard behaviour. The fact that the
>>> DataSet is closed it does not mean is completely destroyed.
>>>
>>> Regards,
>>>
>>> "Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
>>> news:[email=44c12a04@news.xailer.com...]44c12a04@news.xailer.com...[/email]
>>>> Hello !!!
>>>>
>>>> I have a DbfDataset that i use to open a table A or a table B as the
>>>> user shooses one or another...To do that i close the Dataset, change
>>>> the table name and open it again. It works. The problem is that
>>>> although the name and records of the table is changed the
>>>> DbfDataset:aFields is never changed. To solve this I had to destroy the
>>>> Dataset object ( :End() ) and create it again.
>>>> Attached is a sample that shows that Dataset:aFields is allways the
>>>> same.
>>>> Is this the normal behavior ?
>>>> TIA.
>>>> Aguiar !!!
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
Responder