473,395 Members | 1,343 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.

Getting data to the command line

3
I need to get the value of a field in form to a command line and append it after the telnet command. Is this possible?
For example, the field IP_Address value to be appended to:
telnet "value"
I have created a command button that launches the telenet window but don't know how to extract the data and use it here.
Sorry for the lack of knowledge in this area, I inherited this project.
Thanks in advance for any help,

Skip
Jan 3 '07 #1
5 2161
NeoPa
32,556 Expert Mod 16PB
For things like Telnet & FTP you need to create a response file with the parameters required.
What code are you using to start this off? The Shell() function?
Actually, it would be a good idea to go ahead and post your current code.
Jan 4 '07 #2
Skip
3
Here is what I have based on some guidance from another site.
The field that holds the data I want is called IP_Address.
The goal is to launch telnet, and grab the IP address from the field on the form and append it to the CLI.
If I use stAppName = "telnet" only it launches the telent window as expected.
but using the method below it just flashes the dos screen which indicates to me that the IP_Address info is not being appended.
What do you think?
Thanks for the help,
Skip


Private Sub TelnetToAP_Click()
On Error GoTo Err_TelnetToAP_Click

Dim varReturn As Variant
Dim stAppName As String

stAppName = "telnet /" & IP_Address
Debug.Print stAppName

'Call Shell(stAppName, 1)
varReturn = Shell(stAppName & "", 1)
Debug.Print varReturn

Exit_TelnetToAP_Click:
Exit Sub

Err_TelnetToAP_Click:
MsgBox Err.Description
Resume Exit_TelnetToAP_Click

End Sub
Jan 4 '07 #3
NeoPa
32,556 Expert Mod 16PB
Looking at the help for telnet (telnet /?)...
telnet [-a][-e escape char][-f log file][-l user][-t term][host [port]]
-a Attempt automatic logon. Same as -l option except uses
the currently logged on user's name.
-e Escape character to enter telnet client prompt.
-f File name for client side logging
-l Specifies the user name to log in with on the remote system.
Requires that the remote system support the TELNET ENVIRON option.
-t Specifies terminal type.
Supported term types are vt100, vt52, ansi and vtnt only.
host Specifies the hostname or IP address of the remote computer
to connect to.
port Specifies a port number or service name.
It seems that it should work if you leave out the / char.
I had no telnet server to test it on but it worked fine without the host as it did for you.
Jan 4 '07 #4
Skip
3
Great!
That was it.
I removed the / and left a space i.e. "telnet " & IP_Address
and it works perfectly.
Thanks to all for the help!
skip
Jan 5 '07 #5
NeoPa
32,556 Expert Mod 16PB
NP - Pleased to help :)
Jan 5 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
6
by: Christian Convey | last post by:
Hello, I've got a program that (ideally) perpetually monitors sys.stdin for lines of text. As soon as a line comes in, my program takes some action. The problem is, it seems like a very large...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
1
by: thangchan | last post by:
Hi all, i am getting SQL update problem. as below ======================error messages ======================= Server Error in '/CMS' Application....
0
by: CAIBird | last post by:
hi, i've been developing a webservice on machine A and one WebMethod of this webservice will connect to SQL Server2000 on machine B using a connect string defined in Web.config as below: <add...
1
by: iwdu15 | last post by:
hi, how can i get the icon associated with a certain file type? thanks -- -iwdu15
8
by: cypher543 | last post by:
This has been driving me insane for the last hour or so. I have search everywhere, and nothing works. I am trying to use the subprocess module to run a program and get its output line by line. But,...
0
by: JimN1 | last post by:
Error: Update requires a valid UpdateCommand when passed DataRow collection with modified rows. This is a continuation of my previous table element update question. I am now getting the above...
3
by: CSUIDL PROGRAMMEr | last post by:
hi folks I am new to python. I have a module does call a os.command(cmd) where cmd is a rpm command. Instead of using os.command and getting the results on command line , i would like to dump the...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.