By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
I assume from your scenario that your VB application is running on a Windows client: Windows98, Windows2000 or Windows NT workstation.
I'm sorry I don't do VB programming. I do LotusScript (a VB like language) and Java. In both those languages, I have access easily through standard API's to the client URL with its hostname or IP address. LotusScript also has direct access to Windows environment variables such as the local COMPUTERNAME.
IF you don't have an equivalent function (which I have to believe VB would provide such access), you can do one of 2 things:
1. Use OLE automation to access a Windows class that can provide access to the local COMPUTERNAME or IP address.
2. Execute a simple BAT command to run an appropriate function like:
ipconfig > myipaddress.txt, then read & parse the generated file, to get the local IP.
Sorry I didn't have a VB specific example.
Dig Deeper on TCP-IP
Related Q&A from Jim Mason
Java to Excel with the AS400 may be attractive, but if you have complex VBA macros in Excel, the JDBCODBC bridge will not work well for you. A better...continue reading
There are a couple of options for accessing AS/400 data, from the old way using Client Access ODBC drivers, to Java, to a new application from Groovy.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.