By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,480 Members | 3,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,480 IT Pros & Developers. It's quick & easy.

HostName Function with Access2K front end

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 10 Apr 2004 07:34:27 -0700, la*************@hotmail.com (Lauren
Quantrell) wrote:

This is purely a SQL Server question. You may find better responses in
those newsgroups.

If you can't rely on HOST_NAME(), you can pass in the machine name
into the sproc as an additioanl argument. The machine name can be
retrieved reliably with an API call:
http://www.mvps.org/access/api/api0009.htm

-Tom.

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


Nov 12 '05 #2

P: n/a

"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
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


As a complete guess, there may be some network name resolution issue which
means that the server sometimes resolves workstation names incorrectly. You
should be able to investigate this with your network admin if you can pin it
down to just a couple of machines.

As for the blocking issue, it's hard to say without more information, such
as the text of the errors.

Simon
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.