Environment versions
Network:
Windows 2003 Server
Hi Jon.
>I have a section of code that loops through a view. Depending on certain conditions, I do a SCATTER of the current record to an object named oRecord and change any necessary property values so that I can insert a new record into the view from oRecord. Since I don't want to ruin the record pointer in the middle of the loop (or process the inserted records within the loop), I instantiated a collection object to hold all of the oRecord objects. My plan was to iterate through the collection after the main loop was done and insert records from the oRecord objects contained in the collection.
>
>Unfortunately, this doesn't work. For whatever reason, the insert creates a blank record in the view. Why would this happen? When I compare the object from the collection with the object that was created from the SCATTER, all of the properties are exactly the same. Yet, the insert doesn't work when the object is referenced from a collection.
When you retrieve the object from the collection, use the FOXOBJECT keyword to ensure it's a VFP object and not a COM object, which VFP treats differently.
Doug
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only