Subject Re: [IBO] Adding records
Author Florian Hector
> If I must determine first whether the PK exists, what method would be
> best (for efficiency). Should I perform an INSERT and trap for
> errors, or do a query for that PK and (somehow) save the cursor so
> that the resulting UPDATE need not perform essentially another
> search? (That last part wasn't expressed very clearly.)

You could pass the values of the new record to a stored procedure, the SP checks if the PK already
exists and if so, updates the record. Otherwise, it inserts the record.