Solved

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

Posted on 2004-10-05
4
125 Views
Last Modified: 2010-05-02
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
0
Comment
Question by:sbornstein2
4 Comments
 
LVL 5

Expert Comment

by:gary_j
ID: 12230302
What are you trying to accomplish?  Are you trying to do this programatically?  Why?
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 50 total points
ID: 12474239
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Updates not working for MS Windows 7 12 181
VBA filters 2 65
How to make an ADE file by code? 11 94
VB6 - Cannot type when doing an extract from MSHFlexgrid to Excel 6 18
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

860 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