Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 25th, 2004, 10:31 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default store machine name in database

hi all,
could i get the client machine name and i can use it in server code to store it in the database with any record inserted?????

Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer
  #2 (permalink)  
Old September 27th, 2004, 02:10 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

if you are using SQL Server, you can get the name of the client machiene from teh function "HOST_NAME()"

    Select HOST_NAME()

Regards
Ganesh
  #3 (permalink)  
Old September 27th, 2004, 04:23 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

Reply
host_name() get the server machine name not the client
it's like in .net Environment.machinename

Ahmed Ali
Software Developer
  #4 (permalink)  
Old September 28th, 2004, 12:35 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

host_name() will return the name of the SQL Server client machiene. So this can record from which sql client the request came.

Regards
Ganesh
  #5 (permalink)  
Old September 29th, 2004, 09:18 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

sorry my first mean is the user client machine name .. So
i can track which machine inserts,updates,deletes

Ahmed Ali
Software Developer
  #6 (permalink)  
Old September 29th, 2004, 10:55 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

so you want to get the browsers machiene name

Regards
Ganesh


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to store checkbox value in database mona_1dec Struts 22 July 8th, 2011 04:29 PM
Retore Db from a remote machine to a local machine srkvellanki BOOK: Beginning SQL 0 October 3rd, 2008 05:17 PM
How can I store Gridview into Database? divekar.vishal ASP.NET 2.0 Basics 3 April 26th, 2008 08:14 AM
Using DTS to sync Remote Database to Local Machine kevorkian SQL Server DTS 1 March 21st, 2005 11:13 PM
Tranfer sql database from one machine to another Israr SQL Server 2000 10 February 28th, 2005 06:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.