Showing posts with label rdc. Show all posts
Showing posts with label rdc. Show all posts

Friday, March 9, 2012

RDC user info

i want to write user info to a table when row deleted on
delete trigger.how can i get user info ?this user is using
query analyzer and connect server via remote desktop
connection. how can i get this user machine name or ip,
thanksThere are system functions that will return that info. Be aware that the
logged in application can optionally set the host information in its
connection string. SQL just reads what the lower levels tell it.
If you want the machine info, use host_name or host_id.
If you want the logged in user info, use system_user or current_user.
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.

RDC Connection string data

I am using RDC for the Crystal Report 8. I use VB6 and connect to a MSSQL 2000 DB. I currently connect to the database by:

CRReport.Database.Tables(1).SetLogOnInfo sCRServer, sCRDatabase, sCRLogin, sCRPassword

and that works fine, but I would like to be able to pass the Workstation ID(WSID) and App name(APP) like can be done in a standard ado connection string.

i.e.
Cn = "uid=sa;pwd=admin;driver={SQL Server};server=NTSERVER5;WSID=" & Trim(sUserName) & "-" & getUserComputerName() & ";APP=" & App.EXEName & "-" & sServerName & ";database=" & sDatabaseName & ";dsn=,,connection=adConnectAsync"

Any ideas on how to pass that information for crystal to use it, when logging in?I also connected to crystal using :
CRReport.Database.LogOnServerEx "pdssql.dll", sCRServer, sCRDatabase, sCRLogin, sCRPassword, "uid=sa;pwd=admin;driver={pdssql.dll};server=" & sCRServer & ";WSID=" & Trim(sUserName) & "-" & getUserComputerName() & ";APP=" & "CR" & App.EXEName & "-" & sServerName & ";database=" & sDatabaseName & ";dsn=,,connection=adConnectAsync"

but MS SQL in the Prodcess Info, when the report runs stilll doesn't show the WSID and APP information on the server. I passed it above, but??

Any ideas.

thanks,

Dean