update external file
hello, could you help me ...
I need to update an external file,
I try to use the writecase function,
do you have an example to help me,
Update External file
Forum rules
New release: CSPro 8.0
New release: CSPro 8.0
Re: Update External file
This is a two step process 1) load the case into memory you want to update 2) write the case.
For example, let's say I have a STAFF_DICT with a staff id and staff name. Let's say the data file has a single value:
STAFF_ID = 001
STAFF_NAME = Erin
To update the staff name, the logic would look like this:
For example, let's say I have a STAFF_DICT with a staff id and staff name. Let's say the data file has a single value:
STAFF_ID = 001
STAFF_NAME = Erin
To update the staff name, the logic would look like this:
STAFF_ID = 1;
if loadcase(STAFF_DICT, STAFF_ID) then
// data from staff 001 is loaded into memory
// update name
STAFF_NAME = "Aaron";
// write update
writecase(STAFF_DICT);
endif;
if loadcase(STAFF_DICT, STAFF_ID) then
// data from staff 001 is loaded into memory
// update name
STAFF_NAME = "Aaron";
// write update
writecase(STAFF_DICT);
endif;