473,395 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

HostName Function with Access2K front end

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
2 2177
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard Hollingsworth | last post by:
Hello: We've just switched to using Access 2K as the front end to our SQL Server 2K db. Great. Love it. However, one small problem. The users can see the SQL Server tables and veiws but...
1
by: Lauren Quantrell | last post by:
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...
0
by: Blake | last post by:
I have created an Access2K front end application that connects to a SQLServer2K backend. I use this vba code to create the connection from the Access app: Dim strConnect As String 'make sure...
2
by: James M. | last post by:
I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup with NLB (single Affinity, also using SQLServer session state) that are hosting a few .NET ASP web applications under the Default Website...
2
by: Monica Roman | last post by:
Hello all, I have an Access database linked to SQL Server tables and Views. When I upsized the Access tables all the yes/no fields remained the same, i.e., I see a check mark or not. When I...
5
by: laurenq uantrell | last post by:
I am using a control MyTotal on a subform footer to get a sum of all rows on the subform: =Sum() On the main form I have a control whose controlsource is: =Forms!FormName.Child.Form.MyTotal. This...
0
by: James M via .NET 247 | last post by:
(I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup withNLB (single Affinity, also using SQLServer session state) thatare hosting a few .NET ASP web applications under the DefaultWebsite in...
3
by: Mark Delaney | last post by:
When using the MS SQL 2005 JDBC driver, I now need to have the DNS name resolution to the client correctly set up. If not I get the following error: SQLState: 08S01 SQLError: 0 Message:...
4
by: Melancholy Man | last post by:
I am getting a Run-time error 3349 when importing a .txt file into the front end of a DB (DB is split). If I use the same specs on the back-end I do not get the error. Is there some file limitation...
12
by: helveticus | last post by:
Because of licensing reasons, I plan on using ASP.NET 3.5 /Access 2K for a specific site.. What tools could I use to remotely manage the Access 2K DB? Would a simple ODBC connection be adequate?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.