I’m trying to figure out how to use SETPOSITION. I assume this is what I need to do if I want to modify a record and one of the fields I want to change is a key. Any help you can give on this would be greatly appreciated!
Hello, I think RENAME is the function for you, it will help you to modify primary key fld in given table.
SETPOSITION is a command you can use to fill a record with a certain primary key you either compile manually into a text variable or you receive from a GETPOSITION command. After calling SETPOSITION the record is not yet usable, you need to “GET” the record afterwards. Only after that you can access the data of the record. so in case of using a RECREF variable :
RRef.SETPOSITION(SavedPosition); RRef.GET(RRef.RECORDID); in case of yousing a record variable: [code] Rec.SETPOSITION(SavedPosition); Rec.GET(Rec.PrimKey1,[[Rec.PrimKey2],…]); [code] For changing primary key fields you need to use the RENAME command, if you want to change secondary key fields a normal MODIFY is doing it.