Open command Computername

Author: (rogerw)


has someone been able to set the odbc-connection WSID from Uniface.
In other programming languages it's usually possible to set the WSID when initiating the connection "object". I suppose that this could be compared to what's done using "open" in Uniface.
If the WSID isn't set from the client-application the Computername is used. This is seen as the hostname in eg. Sql-Server sysprocesses-table/view (not sure about the table-name), which is usually seen by executing eg. sp_who.

55       0        SLEEP   APPLOWNER      SHAREDMACHINE    0       APPLDB    wait      0
56       0        SLEEP   APPLOWNER      SHAREDMACHINE    0      APPLDB     wait      0

Suppose that the computername is "SHAREDMACHINE", that is what is seen by eg. sp_who. We would like to change this to "Roger on SHAREDMACHINE", Roger being taken from a variable/table known by the client-session.

Is this a wish-candidate, or can it already be done in some way?

Regards RogerW.   


  1. Is it possible to use in the ASN file a specification with all "?" for database, user, and password like "?|?|?" so you can enter these in your OPEN command?

    Author: ulrich-merkel (
  2. Hi Ulrich,

    You have probably gone further and thought about why I need this info. This is alright and perhaps I should have begun with the needs of logging user activity etc.

    However answering your message, there would probably not be a problem if the username of the database would be different for all users (database integrated user-handling). Unfortunately the problematic applications do use one specific database-user (per database) and the application (or actually the menu-system) is keeping the user info in separate tables of the application.
    So, this is true for everyone logging in:
    "?|?|?"     =    MSS:theserver:appldatabase|sameUserForEveryone|samePassword
    ie., the user-handling isn't done by the database but by the application-software (sometimes a combination of the operating-system username and the application, sometimes only the application username-tables). There is no integrated user handling with the database, and in this case it can't be changed.

    This will probably explain why I would need to do some changes to the connection-info, to distinguish between users in some logging routines etc.
    We do have some routines to save the database SPID with the application-user and so getting the right user when logging user activity, but everything would be much easier if you could distinguish the user directlly from the main sys_processes tables.

    Regards RogerW.

    Author: rogerw (