Buffer-replace

Zaphod

New Member
Progress 9.1D

I'm looking for something that would replace the record in one buffer for the record of another buffer. Kinda like the buffer-copy statement but with the option to replace the record if it already exists. Anybody seen code that would do something like this ?

The intent is to have one 4GL procedure that would dynamically load records from a .d file and replace existing records if the the calling program requested it.

ie: run dynload.p ("filename","dumpname","replace").

I have the code that loads the data into a dynamic temp-table. But I'm not sure where to go from here. Once the temp-table is loaded, I can create a query to scan the records of the temp-table and use the BUFFER-REPLACE method (if it existed) to transfer the records from the temp-table to the database table. That would be wonderful. But alas, no such method.

Any ideas ?
 

cgdev

New Member
You can find the record using the unique index on the table using find-first method on the buffer handle of the table. And, use the buffer-copy method to copy the data from temp-table to database table.

I hope this might be a new suggestion..:)

Thanks & Regards,
Gurudev
 

Zaphod

New Member
Thanks

Just got a call from Progress stating the same thing. My routine was not using a find-unique method prior to using the buffer-copy method. I will test this out and try it. I am certain that this will do the trick.

Thank you all for your help.
 
Top