Well, quite simply, you cannot open the same cellView for edit in more than one session at the same time. This is to prevent data loss - otherwise you both would be editing the same data, and whoever saved last would win, and the work done in the other session would be lost.
Your options are:
- Give a sensible error message and exit gracefully when you cannot open something for edit
- Open it read only instead.
- Use dbCopyCellView() to copy the cellView to another (say) viewName, and then open that for edit (probably not desirable though)
- Open in "s" (scratch) mode (although you won't be able to save any modifications made, may be OK - depends on what you're trying to do).
That's really all I can think of - without understanding what you're actually trying to do, it's hard to advise further. Even then, this is a fundamental limitation (for very good reasons) of the tools, so you need to operate within those constraints.