Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Import Then Replace in Multi-User database


trevorg

This topic is 8196 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi All,

I have recently inherited a database. One of the issues I am taking care of is an importing script. I have noticed that after this import is completed, there are multiple Replace commands to set data in other fields. I know that Replace in multi-user is destined to fail due to record locking. My question is, does it also have the potential to fail if the records are brand new (due to the import), and no users would be on those records.

My analysis is, it is still possible these records could immediately lock, if say, a users database is on a record that has a portal that might relate to a newly imported record "all of a sudden".

Is it necessary to "replace" the Replace command with a looping Set Field through each record and to capture any locking errors and log them if it happens? Also, What is the CurrentError code for a locked record?

Thanks in advance, these boards are great!

Link to comment
Share on other sites

If you can guarantee that no one is in the records, then the replace should work. However, as you mentioned yourself, there are known problems where records lock because they happen to appear in a portal somewhere. On the other hand, a looping script with a set field command can actually be as fast, or sometimes faster than multiple replace commands if set up carefully. So, I suggest you redo it using set fields.

Link to comment
Share on other sites

This topic is 8196 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.