Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCATTER / GATHER NAME and NULL dates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Firebird
Application:
Desktop
Divers
Thread ID:
01381731
Message ID:
01381732
Vues:
71
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>I SCATTER a record to an object and then GATHER from the object now I have an issue with dates that are empty, NULL on the backend.
>
>I have confirmed in the debugger that the property of the gathered object for dates is type D but there is no value being NULL. When this is gathered it looks like somewhere down the line it is filling in a blank instead of null, now the problem is I can't replicate this myself just happens at a client.
>
>I was hoping to use FOR EACH and modify the properties for dates with maybe {} using the following code:
>
*** create a public object reference
>PUBLIC goCopiedRec
>
>SELECT (THIS.cAlias)
>
>*** scatter the current record into the public variable
>SCATTER MEMO NAME goCopiedRec
>
>FOR EACH loProp IN goCopiedRec
>	WAIT WINDOW loProp.name
>ENDFOR
>
>I get the following error:
>Error #: 1734
>Message: Property GOCOPIEDREC is not found.
>
>I am sure I am missing something but can't place it.
>
>Thanks and regards.

You can't use FOR EACH because goCopiedRec is not a Collection or array. In VFP9 it is an instance of EMPTY class. You could use AMEMBERS() and process the array.
BTW when you SCATTER to name and you have NULL in it the property also have NULL. The debuger just didn't show it maybe you have SET NULLDISPLAY TO [] somewhere?
Check this:
SET NULLDISPLAY TO
CREATE CURSOR crsTest (Fld1 I, Fld2 D NULL)
INSERT INTO crsTest VALUES(1,NULL)
SCATTER NAME aaa
? aaa.FLD2
? TYPE([aaa.FLD2])
INSERT INTO crsTest FROM NAME aaa
BROWSE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform