We don't know how to lock a record (and only a record) with Delphi

We are trying to program a concurrent application with a client-server
model.

We are using Informix ODS 7.23
We access with Intersolve's ODBC Informix Cli 2.5

Imagine we have two users A, B and recod R

A read the record R for changing it
B read the same record R before A commit its work.

Our ODBC allow A to detect that the record have been changed since the last
time A read it only when A tell to Informix "commit work".
But we want to know that A has read R when B try to read it.

Because of we are beginning to program in Delphi, we don't know how to make
it.

We have listened something about semaphores.

Thank you