Solved

Help with syntax of command line help.

Posted on 2015-02-11
5
69 Views
Last Modified: 2015-02-13
I need help with the correct syntax of command line help.

For this exe, either /ALL can be specified, or /legacy_table and /SQL_table=SQL.  if the later, the /DELETE and /SCHEMAONLY are optional.  I know what I have below is not quite correct.   Thanks.


Console.WriteLine("LegacyExport [/ALL] [/DELETE] [/SCHEMAONLY]")
Console.WriteLine("         </legacy_table=legacy table name> ")
Console.WriteLine("         </SQL_table=SQL table name> ")
Console.WriteLine("         [/?] (prints this help message)")
0
Comment
Question by:HLRosenberger
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:louisfr
ID: 40605056
I understand you can have two sets of parameters:
1) /ALL, with optional /DELETE and /SCHEMAONLY
2) /legacy_table and /SQL_table
Then I would write it like this:
Console.WriteLine("LegacyExport /ALL [/DELETE] [/SCHEMAONLY]")
Console.WriteLine("LegacyExport /legacy_table=<legacy table name> /SQL_table=<SQL table name>")
Console.WriteLine("LegacyExport /?")

Open in new window

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 40607930
Not quite...  /ALL is an arg all by itself.   if /ALL is specified, not other args are required.

if all is not specified, then /legacy_table and /SQL_table must be specified, and optionally /DELETE] and/or [/SCHEMAONLY]
0
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
ID: 40607974
Then I would write it like this:
Console.WriteLine("LegacyExport /ALL")
Console.WriteLine("LegacyExport /legacy_table=<legacy table name> /SQL_table=<SQL table name> [/DELETE] [/SCHEMAONLY]")
Console.WriteLine("LegacyExport /?")

Open in new window

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 40607982
ah, got it!  Write each possible invocation on a separate line.

 Thanks much!
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 40607983
thanks!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now