Ok, I still need a way to identify the client machine that is connected to sql server. What I use now is something like
select foo from bar where hostid = host_ID()
where hostid was written into foo on application start. I know that there are chances of duplicate hostids with more than one client, but that's taken care of.
This breaks on win98, though, cause host_id() returns char(8), which is isufficient for high process ids on win98 clients. It then returns an asterisk. Not good.
So I'm searching for some replacement along the lines of
Select foo from bar where <value_inserted_on_startup> = <something_that_returns_a_client_specific_value>
To make things worse, this has to work on terminal services, too.
Any hints would be greatly appreciated. I can give additional info if needed.