1. Beatrix Willius
  2. Valentina Server
  3. Saturday, November 03 2018, 12:14 PM
  4.  Subscribe via email
I want to partially duplicate the user information screen from Valentina Studio. With my app and with Valentina Studio I'm logged in as "sa" and as "trixi" (both admins):

https://imgur.com/lxnhp78.png

There is an example called "ValentinaServerUtility". It has code to get the user info:


dim dbName as string
dim ci as VClientInfo
dim dbi as VDataBaseInfo
dim i, j as integer

if ListBoxDatabaseInfo.SelCount = 1 then
dbName = ListBoxDatabaseInfo.cell(ListBoxDatabaseInfo.ListIndex, 0)
for i = 1 to mValentinaServer.DatabaseCount
dbi = mValentinaServer.DatabaseInfo(i)
if dbi<>nil then
if dbi.Name = dbName then
ListBoxClients.deleteAllRows
for j = 1 to dbi.ClientCount
ci = dbi.ClientInfo(j)
if ci<>nil then
ListBoxClients.addRow ci.Address
ListBoxClients.cell(ListBoxClients.Listcount-1, 1) = str(ci.ConnectionID)
ListBoxClients.cell(ListBoxClients.Listcount-1, 2) = ci.Login
ListBoxClients.cell(ListBoxClients.Listcount-1, 3) = str(ci.Port)
end if
next
exit
end if
end if
next
end if


Not pretty, but not complicated. But the result is odd:

https://imgur.com/oXUlIRZ.png

Note the information for user with the connection ID 32. The user name is "sa". However, according to Valentina Studio this should be "trixi". Bug or feature? Did I misunderstand something?
Comment
There are no comments made yet.
Indeed, for all connections, you get the current login, not the login for the chosen connection
Very old behavior that, for sure, I consider as a bug.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 1
Beatrix Willius Accepted Answer
Okay, I made a Mantis issue at: http://www.valentina-db.com/bt/view.php?id=8396

The question is then: how does Valentina Studio get the correct information?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 2
Beatrix Willius Accepted Answer
Got it working with SQL "show connections".
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 3
Extra. Thank you sharing this.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Server
  3. # 4
  • 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. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories