Re: ESQL/C: Table Open?
Posted in 1997
Rajendra, > Is it possible using ESQL/C to determine whether a table (running on > SE) is being used by another process/user? If so, how? only if the user has the table locked. look at the sqlca structure. it will return a lot of information about the previous operation, as well as just the normal error return codes. the basic stategy would be to try and lock the table in exclusive mode and see what the result is. if you can lock it in exclusive mode, then no one else has any locks on the table, even shared locks. this depends on what you need this info for. you want to be careful about how you use and exclusive lock on a table, as no one else can access it while you have that lock. so you need to be sure you only have the lock on the table as long as you need it, and release it as soon as you are finished. hope that helps. mickm