|
-
Nov 20th, 2006, 01:26 AM
#1
Thread Starter
Lively Member
[RESOLVED] command line argument
I have specified command line argument in project properties this argument is mandatory to specify for my app license manager and this app is developed for SAP which also need to specify connection string in command line argument although I have tried to hardcode the connection string but my app stop working.
Can I change command line in code? Any help please?
-
Nov 20th, 2006, 01:27 AM
#2
Frenzied Member
Re: command line argument
-
Nov 20th, 2006, 01:34 AM
#3
Thread Starter
Lively Member
Re: command line argument
thanks for rpl jeroen79
i know how to access "Command" i want to know how can i specify 2 command line argument .... or is there any other way for my problem?
-
Nov 20th, 2006, 01:58 AM
#4
Frenzied Member
Re: command line argument
Make sure that there is something that separates the arguments (like a space or a slash) and then split the command string on this separator.
-
Nov 20th, 2006, 02:03 AM
#5
Re: command line argument
you can get the value of command at any time, if you have more than one argument in command you will have to split it or otherwise process the string
example
VB Code:
Text1 = Split(Command, " ")(2)
will put the third argument into the text box
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Nov 20th, 2006, 02:05 AM
#6
Re: command line argument
My suggestion is to use / or |. Because some times we might have space in our commandline.
For example, if you are passing a file path with other arguments, like
YourApp.exe "C:\Program Files\Test.exe" BlankMain
In this case you might face problem if you use space as a delimiter.
-
Nov 21st, 2006, 12:24 AM
#7
Thread Starter
Lively Member
Re: command line argument
thanks for rpl
problem solved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|