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

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

Dataset

Mensaje por Aguiar Costa »

Hello
I have a TDBMaskEdit that i want to show inicialized with a value to be
added to a table.So i'm doing it like this:
oDataset:AddNew()
oDataset:Codigo := "0011"
TForm2:ShowModal()
The Dataset buffer field gets the value but TDBMaskEdit linked to that field
is showed empty(). Am i missing something ??
Attached is a sample.
TIA.
Regards
Aguiar !!!


Attached files Dataset.zip (2.9 KB)Â
pablogarciau
Mensajes: 133
Registrado: Lun May 22, 2006 10:26 am

Dataset

Mensaje por pablogarciau »

Aguiar escribió:
> Hello
>
> I have a TDBMaskEdit that i want to show inicialized with a value to be
> added to a table.So i'm doing it like this:
> oDataset:AddNew()
> oDataset:Codigo := "0011"
> TForm2:ShowModal()
> The Dataset buffer field gets the value but TDBMaskEdit linked to that field
> is showed empty(). Am i missing something ??
> Attached is a sample.
> TIA.
> Regards
> Aguiar !!!
>
>
Try This:
oDataset:AddNew()
oTDBMaskEdit:Value:="0011"
TForm2:ShowModal()
pablogarciau
Mensajes: 133
Registrado: Lun May 22, 2006 10:26 am

Dataset

Mensaje por pablogarciau »

Aguiar escribió:
> Hello
>
> I have a TDBMaskEdit that i want to show inicialized with a value to be
> added to a table.So i'm doing it like this:
> oDataset:AddNew()
> oDataset:Codigo := "0011"
> TForm2:ShowModal()
> The Dataset buffer field gets the value but TDBMaskEdit linked to that field
> is showed empty(). Am i missing something ??
> Attached is a sample.
> TIA.
> Regards
> Aguiar !!!
>
>
Try This:
oDataset:AddNew()
oTDBMaskEdit:Value:="0011"
TForm2:ShowModal()
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9440
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Dataset

Mensaje por ignacio »

Aguiar,
When you write this line of code:
oDataset:Codigo := "0011"
The DataControls are already created and asigned its value from the DataSet
buffer. With the above of line you ONLY change the dataset buffer, but not
the value of the data control. In order to change the datacontrol value is
better to change it directly:
oDbMaskEdit:Value := "0011"
Regards,
"Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
news:[email=446da42c@ozsrvnegro.ozlan.local...]446da42c@ozsrvnegro.ozlan.local...[/email]
> Hello
>
> I have a TDBMaskEdit that i want to show inicialized with a value to be
> added to a table.So i'm doing it like this:
> oDataset:AddNew()
> TForm2:ShowModal()
> The Dataset buffer field gets the value but TDBMaskEdit linked to that
> field is showed empty(). Am i missing something ??
> Attached is a sample.
> TIA.
> Regards
> Aguiar !!!
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

Dataset

Mensaje por NoName »

Aguiar,
When you write this line of code:
oDataset:Codigo := "0011"
The DataControls are already created and asigned its value from the DataSet
buffer. With the above of line you ONLY change the dataset buffer, but not
the value of the data control. In order to change the datacontrol value is
better to change it directly:
oDbMaskEdit:Value := "0011"
Regards,
"Aguiar" <aguiar.costa@sisbit.pt> escribió en el mensaje
news:[email=446da42c@ozsrvnegro.ozlan.local...]446da42c@ozsrvnegro.ozlan.local...[/email]
> Hello
>
> I have a TDBMaskEdit that i want to show inicialized with a value to be
> added to a table.So i'm doing it like this:
> oDataset:AddNew()
> TForm2:ShowModal()
> The Dataset buffer field gets the value but TDBMaskEdit linked to that
> field is showed empty(). Am i missing something ??
> Attached is a sample.
> TIA.
> Regards
> Aguiar !!!
>
>
Aguiar Costa
Mensajes: 115
Registrado: Jue Jun 01, 2006 7:21 pm

Dataset

Mensaje por Aguiar Costa »

Thank you Ing. and Ignacio.
Regards
Aguiar !!!
"Aguiar" <aguiar.costa@sisbit.pt> escreveu na mensagem
news:[email=446da42c@ozsrvnegro.ozlan.local...]446da42c@ozsrvnegro.ozlan.local...[/email]
> Hello
>
> I have a TDBMaskEdit that i want to show inicialized with a value to be
> added to a table.So i'm doing it like this:
> oDataset:AddNew()
> oDataset:Codigo := "0011"
> TForm2:ShowModal()
> The Dataset buffer field gets the value but TDBMaskEdit linked to that
> field is showed empty(). Am i missing something ??
> Attached is a sample.
> TIA.
> Regards
> Aguiar !!!
>
>
------------------------------------------------------------ --------------------
>
>
>
Aguiar Costa
Mensajes: 115
Registrado: Jue Jun 01, 2006 7:21 pm

Dataset

Mensaje por Aguiar Costa »

Thank you Ing. and Ignacio.
Regards
Aguiar !!!
"Aguiar" <aguiar.costa@sisbit.pt> escreveu na mensagem
news:[email=446da42c@ozsrvnegro.ozlan.local...]446da42c@ozsrvnegro.ozlan.local...[/email]
> Hello
>
> I have a TDBMaskEdit that i want to show inicialized with a value to be
> added to a table.So i'm doing it like this:
> oDataset:AddNew()
> oDataset:Codigo := "0011"
> TForm2:ShowModal()
> The Dataset buffer field gets the value but TDBMaskEdit linked to that
> field is showed empty(). Am i missing something ??
> Attached is a sample.
> TIA.
> Regards
> Aguiar !!!
>
>
------------------------------------------------------------ --------------------
>
>
>
Responder