SQL Server HostName

toddre

New member
Local time
Today, 11:42
Joined
Apr 9, 2007
Messages
3
I have a access application that utilizes a sql server database.

When I view the current users logged into the database by running the sp_who command in Query Analyizer, there is a column called "Hostname" that displays the computer name of the computer I used to develop the application.

Since this is showing the original computer name that I compiled the application on, I am assuming that this is stored in the .mdb file. For anyone who is running this app, regardless of the computer they are logging in from, it displays the original computer I developed the app on..

Does anyone know where this value is stored in my .mdb file??

Thanks ahead of time...:)


Todd Renier
Senior Programmer
COT
 
Last edited:
It's not stored directly in your .mdb file as far as I know. But you can obtain this information from the Windows APIs

Example vb(a) code to get IPaddress/Hostname information can be found here
 
The hostname that displays in SQL Server is the same regardless of which computer the app is ran from. This is why I believe the value is coming from the application file itself.
 
Nellie is correct. Look at your connection string.
 
Thank you Gentleman

Thanks tehNellie

I have not had time to look at this issue today but I will look at the connection string.. I will let you know what I find..

Respectfully,

Todd
 

Users who are viewing this thread

Back
Top Bottom