I have an ASP page for editing a recordset.

A function AddUser is in the page. The AddUser function opens a recordset, adds a new record, updates the recordset, and closes.

The edit function checks to see if a new id is coming in, if not the AddUser function is called and returns the new id.

Everything is fine at this point.

At the next step, I open a new recordset using the new id value.

This recordset does not return a record because (it appears) the new record hasn't gotten in yet. If I refresh, then it is there. It seems like a need a timer or a delay between adding the new user, and retrieving the recordset. Or is there a better way to do this?