Get Computer Name 
Author Message
 Get Computer Name

Dear All,

Would anyone pleased to teach me how to get the computer name from VFP 6.0,
because I need to log the transaction on each computer.

Appreciated for any suggestion

C.W. Choi



Fri, 10 Dec 2004 11:43:10 GMT  
 Get Computer Name
Look at sys(0).  Example:
 compname = left(sys(0),at('#',sys(0))-1)

Boyd


Quote:
> Dear All,

> Would anyone pleased to teach me how to get the computer name from VFP
6.0,
> because I need to log the transaction on each computer.

> Appreciated for any suggestion

> C.W. Choi



Fri, 10 Dec 2004 12:34:18 GMT  
 Get Computer Name
Dear Boyd,

Thank you very much,

C.W. Choi



Quote:
> Look at sys(0).  Example:
>  compname = left(sys(0),at('#',sys(0))-1)

> Boyd



> > Dear All,

> > Would anyone pleased to teach me how to get the computer name from VFP
> 6.0,
> > because I need to log the transaction on each computer.

> > Appreciated for any suggestion

> > C.W. Choi



Fri, 10 Dec 2004 13:46:32 GMT  
 Get Computer Name
could do:

compname = GETWORDNUM(SYS(0),1)

prevents from calling sys() a couple times.  AFAIK
computer names can not contain spaces so should work on
most computers.  Not sure the results you should expect if
the computer is not networked.  

On my system the above code is almost twice as fast.

John B

Quote:
>-----Original Message-----
>Look at sys(0).  Example:
> compname = left(sys(0),at('#',sys(0))-1)

>Boyd



>> Dear All,

>> Would anyone pleased to teach me how to get the

computer name from VFP
Quote:
>6.0,
>> because I need to log the transaction on each computer.

>> Appreciated for any suggestion

>> C.W. Choi

>.



Sat, 11 Dec 2004 21:57:17 GMT  
 Get Computer Name
FWIW ID() gives the same result.

-Cliff


Quote:
> Look at sys(0).  Example:
>  compname = left(sys(0),at('#',sys(0))-1)

> Boyd



> > Dear All,

> > Would anyone pleased to teach me how to get the computer name from VFP
> 6.0,
> > because I need to log the transaction on each computer.

> > Appreciated for any suggestion

> > C.W. Choi



Sun, 12 Dec 2004 02:57:26 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Getting user name and domain name using VFP

2. Find network computers name

3. Determine computer name

4. Obtaining a computers network name

5. Accessing a computer's network name

6. Obtaining a computers network name

7. Computer Name in MTS ?

8. Computer Name in fox 6

9. Computer Name on The network

10. Get Computer Name

11. getting a file name

12. Getting NOVELL Queue Name FP 2.x

 

 
Powered by phpBB® Forum Software