We are planing to migrate from BDE to UniDAC on Delphi 2007 with SQL Server 2005...
I did tests with the version 3 (trial) of UniDac...
The single biggest issue for us was that in the BDE Database component is the connection parameter "HOST NAME".
When my application logs with a particular user at run-time change this parameter to the [Host name + '/' + user that logged in my application] ...
Under Backend (not sure how) the BDE automatically changes the host_name () SQL Server to get [Host name + '/' + user that logged in my application].
Example of how you look after:
-------------------------------------
SELECT host_name() as host_user
Result: "computer01/john"
With that use this information to generate logs in my application through Procedures and Triggers in SQL Server.
Question:
------------
* How can I do this using UniDac???
* If you do not have to do this in UniDac, have how to use a command to set the host_name () as I want?
Thanks in advance!!
BDE Migration to UniDAC with SQL Server 2005
-
AndreyZ
Hello,
To identify the workstation, you can use the WorkstationID specific option for SQL Server. Here is a code example:
To identify the workstation, you can use the WorkstationID specific option for SQL Server. Here is a code example:
Code: Select all
UniConnection.SpecificOptions.Values['WorkstationID'] := 'computer01/john';
UniQuery.Connection := UniConnection;
UniQuery.SQL.Text := 'SELECT HOST_NAME()';
UniQuery.Open;
ShowMessage(UniQuery.Fields[0].AsString); // here you will see the 'computer01/john' message