September 22, 2014 at 2:19 pm
I want to use the HOST_NAME() system variable in a stored procedure to get the name of the machine from which the stored procedure is called. If I execute the stored procedure from SQL Mgmt Studio, it works as expected. The stored procedure returns the name of my workstation.
When the stored procedure is executed from a C++ program, HOST_NAME() returns spaces. Any idea as to why this would be happening?
September 22, 2014 at 3:10 pm
Check the connection string which the C++ app is using. The host name can be specified in the connection string.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy