Microsoft
Software
Hardware
Network
Question : Host_Name returning wrong computer name
Using SQL Server 2008: If I run a query from Management Studio on my workstation and just say select Host_Name() as myPC, then it correctly returns the name of my workstation.
I created a trigger on a table that uses the Host_Name() function when a record in that table is updated. If I connect to SQL server using Microsoft Access, modifiy a record in the table, then the function doesn't return the name of my workstation or even the name of the server that SQL server is hosted on. Instead it returns the name of our Terminal Server.
What's going on here? How can I correctly identify either the workstation or login name of the user that is modifying a record? We are not using Windows authentication. We are accessing sql server with Microsoft Access via ODBC connection.
Answer : Host_Name returning wrong computer name
I have seen this before with MS Access. You will find in your data source connection, where you can actually specify the workstation name. SQL then takes this as the actual workstation. Please take a look at the data source, I hope this helps
Random Solutions
Print pdf, word, and excel email attachments from inbox folder
How can I retrieve a message I just wrote but hadn't had chance to save?
how to change the automatic update settings on server 2008
How can I parse the following string, store it in a variable and then use those variables to populate some txt fields?
Word 2002/xp: Error Message: "Run-time error '4248'; 'This command is not available because no document is open.'"
Spell check two languages at the same time
Setting msExchMailboxSecurityDescr
iptor with VB.NET
Error string in catch block?
How can I run my PC in safe mode?
error when calling php/xml file in browser