1. Beatrix Willius
  2. Valentina Server
  3. Friday, March 30 2018, 06:05 AM
  4.  Subscribe via email
The example for VClientInfo at roducts:adk:api:vdatabaseinfo_class:methods" target="_blank" rel="nofollow">https://valentina-db.com/docs/dokuwiki/v7/doku.php?id=valentina:products:adk:api:vdatabaseinfo_class:methods

is incorrect:


dim ci as VclientInfo

for i = 1 to dbi.ClientCount
ci = dbi.DatabaseInfo
...
next


The correct code is:

for i as Integer = 1 to DatabaseInfo.ClientCount
dim cl as VClientInfo = DatabaseInfo.ClientInfo(i)
next

Why is the ClientCount always one too high? If I log in one user the ClientCount is 2. Looking at the corresponding ClientInfo the second one is Nil. Bug or feature?

Mit freundlichen Grüßen/Regards

Beatrix Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
I think that VClientInfo does something different than I thought. It can only give information about the CURRENT user. If I execute the following code:


dim users(-1) as string
for i as Integer = 1 to DatabaseInfo.ClientCount
dim cl as VClientInfo = DatabaseInfo.ClientInfo(i)
if cl = Nil then
users.Append("other user")
else
users.Append(cl.Login)
end if
next


Then VClientInfo is only non-Nil for the current user. I thought that this would give me information about all connections, but it's only the current user.

Mit freundlichen Grüßen/Regards

Beatrix Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 1
Ivan Smahin Accepted Answer
Please, report it to the Mantis - it seems to be a bug here.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 2
Beatrix Willius Accepted Answer
Done: http://www.valentina-db.com/bt/view.php?id=8227

Is there another way to get this information? The connection count always adds 2 connections for ValentinaStudio.

Regards

Beatrix Willius
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories