Test for only one user (All data files)

Jim Creak jim at jacsoft.co.nz
Fri Mar 27 18:01:05 EDT 2015

I might have it wrong, but here is what i do

First close any SQL sessions that I might have active to the datafile


If FAG_Data_Type=2  ;; Are we linked to the datafile via ODB
	Test for only one user
	Calculate LB_Single_User as #F
	Calculate #F as $cdata.$shared.$assign(kFalse)
	Calculate LB_Single_User as not($cdata.$shared)
End If

This returns LB_Single_User if I was able to gain single user access, of course I also need to have 

If FAG_Data_Type<2
	Calculate $cdata.$shared as kTrue
End If

At the end of the procedure to release the shared lock on the datafile if required.


JACSoft Programming Ltd.

On 28/03/2015, at 2:05 AM, Hans van der Scheer wrote:

> Listmembers,
> I've a standalone situation for testing and developing. When i use the
> statement [Test for only one user (All data files)] it returns False. Even
> though i'm the only user.
> What is checked by Omnis? How can i solve (tweak) this?
> Thanks in advance.
> Met vriendelijke groet,
> Hans van der Scheer
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list