>Hi all,
>
>I know how to determine and limitting the number of concurrent users in a VFP database via record locks.
>
>But how can you limit the number of users when all data is on the SQL-server (thus the record lock strategy does not work here). How can this be as much bulletproof as we don't have any control over what a system administrator is doing. It should also handle crashed clients properly.
>
Walter,
I'm not sure, but if I were to start looking anywhere, it would be at the SQLDMO object. Of course, if it (the licenses in use) were available, you'd have to be able to connect to the SQL Server as an administrator.
SQL Server licensing comes in a couple of flavors, so it's difficult to know what your scenario is. There's excellent coverage of the licensing possibilities in "Inside SQL Server 7.0". If you exceed the license count, SQL Server will throw error 18458, which means all available licenses are in use. It would probably be easiest to trap that error.
George
Ubi caritas et amor, deus ibi est