Hello,
In BDE Administrator, when de users autenticate in system, I set a property in the settings of connection named "HOST NAME", and in SQL Server I execute de command sp_who, the column hostname has the information that I put in connection. In my case, I put the name of the user to know if there are more them one connection with the same name.
How can I do it with Devart DBXpress Driver for SQL Server?
HostName in SP_WHO
Re: HostName in SP_WHO
By default, dbExpress uses the WorkstationID connection parameter to pass the name of the local machine. You can override this value in our driver using the extended driver option 'Custom String'. For example, if you need to specify the name of a local machine as your_host_name, then add the following code before establishing connection:
See more details about the 'Custom String' driver extended option in the Readme.html file, that is in the folder with installed dbExpress driver for SQL Server.
Code: Select all
SQLConnection.Params.Add('Custom String=WorkstationID=your_host_name);