Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grabbing handles on an Intra-net 3

Status
Not open for further replies.

ajpa

Programmer
Jan 31, 2002
52
GB
I'm new to using FoxPro on a network. I've written an application that needs to know the user's handle (by which he logged on to the net) so as to customise the form with information specific to him. Is there a way of interrogating the intranet to find out who has just opened my application? Through a DOS command, perhaps?

Tony
 
FoxPro has a built-in function to grab the current computer's network name and the user's login name. Try typing the following in your Command Window:
Code:
?SYS(0)
You'll get COMPNAME#USERNAME. Just parse the string to grab either name by itself.
 
LOL I've been programming Fox for 7 years+ and never realised that was there!! I knew there was something that returned the machine name, but never knew it did the user name too! Something seemingly trival but oh so useful. Thanks!
 
Dear chpicker

Ah, yes, I see. So one can send a reply to one's own question to say thank you. (I'm new to this kind of information exchange as well - isn't it an amazing institution!).

Thank you very much for this helpful reply.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top