is this OK

Robert Brenstein rjb at rz.uni-potsdam.de
Mon Oct 13 20:40:18 CDT 2003


>Im working on a project which requires 7 data entry screens for 1 record.
>When the user wants to add a record I first do this:
>SetBlank(pCurrentCursor)
>
>Each time they navigate to the next screen I am doing this:
>
>repeat with j = 1 to numFieldsOnForm
>	--strFldContent = (get data)
>	SetField(pCurrentCursor, j, strFldContent)
>end repeat
>
>When I get to the end of the 7th screen I ask if they want to save or
>cancel. If they want to save I just call:
>UpdateRecord(pCurrentCursor)
>
>Is it OK to do nothing if they choose to cancel? Im assuming that by calling
>setField Im using memory, Is there a way to clear this?
>
>Im doinbg this in Director 8.5 by the way Thanks
>Eric

Are you talking about creating new records or just editing? In the 
former case, you need AddRecord at some point.

I have a situation similar to yours, which requires both adding and 
editing records. I use two tables to handle this. One for permanent 
storage and one for working. When user requests a new record, I just 
add a new record with default values to the work table. If user 
request to edit an existing record, I copy the record from storage to 
the work table. The records in work table are timestamped with last 
activity, so I can reuse records that were abandonded. The permanent 
record is updated only when user formally closes the edit session and 
commits the changes/new data. During this step I also stamp the work 
record as abandonded. Edit sessions use Valentina's recId as unique 
identifier (passed to web forms to identify the session). Permanent 
records have their own identifier field. Zero value in that field 
allows me to distinguish new records from records that are being 
edited.

Robert Brenstein


More information about the Valentina mailing list