Get validation using database object
Posted: Fri Jan 06, 2006 4:28 pm
I'm working with a database object and need to validate a get assigned to one field of the database object. Example:
The question is I've noticed that if I make the search for validation propossal with this code I lost the initial value of the gets it takes the database record value. I try to assign the get's initial value to a var in order to perform the validation like this
but after set the buffer of the database object to false the var value is lost.
So, I need to make a validation keeping the original values of the gets
Thanks for your comments
Code: Select all | Expand
redefine get oGet[ 1] var oNomTra:nomtracod id 1001 of oFld:aDialogs[1] picture '@!' update
...
...
oNomTra:Blank()
...
...
nReg := oNomTra:RecNo()
oNomTra:Seek( oNomTra:nomtracod )
oNomTra:GoTo(nReg)
The question is I've noticed that if I make the search for validation propossal with this code I lost the initial value of the gets it takes the database record value. I try to assign the get's initial value to a var in order to perform the validation like this
Code: Select all | Expand
cCode := oNomTra:nomtracod
oNomTra:lBuffer := .f.
oNomTra:Seek( cCode )
oNomTra:GoTo(nReg)
oNomTra:lBuffer := .t.
but after set the buffer of the database object to false the var value is lost.
So, I need to make a validation keeping the original values of the gets
Thanks for your comments