In an Insert Into statement I have used the Host_Name() function to
identify which user has suppied a record to a table that holds
temporary data.
I'm using an Access2K front end.
Code:
Alter procedure SPName
@parameter1 int
AS
Set nocount On
Set xact_abort off
Declare @myHost nvarchar(50)
Set @myHost = Host_Name()
Insert Into tblMyNameTEMP(UniqueID, AnyField1, AnyField2,
myMachineName)
SELECT tblMyName.UniqueID, AnyField1, AnyField2, @myHost
FROM tblMyName
WHERE tblMyName.UniqueID = @parameter1
I have two problems.
In some cases (and only on one or two of maybe about 250 client
workstations) Host_Name() returns the name of MY machine. I'm thinking
this is because I developed the app and distributed it and for some
reason it's retaining the info contained in my original connection
setup set in the MS-Access Connection window???
Also, on some occasions, I get blocking messages in my trace log
following this operation.
Any help on these two issues is appreciated.
lq