04-01-2016 07:11 PM - edited 04-01-2016 07:14 PM
Hello,
I want to develop a function that return the number of connected users to an access database. I have CVI 2013 and the SQL toolkit.
Thanks in advance !
------------------------------------------------
Bonjour,
J'ai une base sur le reseau, et je voulais développer une fonction (CVI 2013 + toolkit SQL) qui me renvoie le nombre des utilisateurs connectés à cette base.
Merci d'avance !
Solved! Go to Solution.
04-04-2016 03:29 PM
Hi Houssam_AZ
I think that for a question like this, it would be best to visit a forum like Stack Overflow. This forum will help you with many LabWindows™/CVI™-specific questions, generally related to the environment, while Stack Overflow helps more with how to implement code in general. I've found a forum link that may be a good starting point for you.
That being said, on the LabWindows/CVI side, I believe that these two links should be able to help you use the SQL toolkit effectively. The first goes over how to activate a SQL statement, while the second outlines just about every function you could possibly want to use in the SQL toolkit library.
Does that help to give you a good starting point?
04-04-2016 11:39 PM
Mightbe you can use this example code in BASIC provided by Microsoft as a start.
04-20-2016 02:57 AM
Thanks guys, unfortunately I didn't found an SQL function that return the number of connected user directly. This is possible only on SQL Server.
What I did is this : I created two fields in my database : a flag "DB_is_used" and a field "User_name", and each user how want to use the database, should check these fields, if empty, he insert his PC name and use the database. Or, if the filed are not empty, he will see a message popup displaying the user name "reserving" this database and hedisconnect from it immediately.
It works for me and I'm satisfied.
Regards,