How to pass a username and password into a VB application Project Prop - Make - Command Line Argument

How can I pass a SQL username and encrypted password into the Command Line Argument under Project Properties and then the Make tab?  How can I get the encryption of the password /P in there?  Thanks all
sbornstein2Asked:
Who is Participating?
 
vinnyd79Connect With a Mentor Commented:
To get command line args you don't need to specify them under the make tab. The Command$ string will pass all arg's to your app so you can parse them and process them accordingly.For example:

Private Sub Form_Load()

If Command$ <> "" Then
    Dim arrArgs() As String, i As Integer
    arrArgs = Split(Command$, " ")
   
    For i = 0 To UBound(arrArgs)
        MsgBox arrArgs(i)
        If i = 0 Then MsgBox "UserName is " & arrArgs(i)
        If i = 1 Then MsgBox "Password is " & arrArgs(i)        
    Next i

End If
End Sub

0
 
gary_jCommented:
What are you trying to accomplish?  Are you trying to do this programatically?  Why?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.