Solved

Change as400 user profile status via VB

Posted on 2010-11-12
2
1,412 Views
Last Modified: 2012-05-10
Hi,

I'm trying to use below code to execute and change as400 user profile status from a web page, But i'm getting a error message, can anyone help to fix this code,

Dim system As New cwbx.AS400System()
        On Error GoTo failed
        Dim YOUR400 As New cwbx.AS400System
        Dim servers As New cwbx.SystemNames
        Dim Command As New cwbx.Command

        'YOUR400.Define(servers.DefaultSystem)
        Command.system = YOUR400

        ' Enter USERID and PWD so the users will not be prompted
        Command.system.Define("as400")
        Command.system.UserID = "qsecofr"
        Command.system.Password = "xxxxxx"
        Command.system.IPAddress = "xx.xx.xx.xxx"

        ' Run any valid 400 command from VB
        Command.Run("CHGUSRPRF USPRPF(user11) STATUS(*ENABLED)")

        Exit Sub
failed:
        MsgBox("AS/400 User Account Status Change Failed")
0
Comment
Question by:PMS-ICT
2 Comments
 
LVL 10

Accepted Solution

by:
Chad Smith earned 500 total points
ID: 34121317
You have misspelled USPRPF it should be USRPRF
0
 
LVL 34

Expert Comment

by:Gary Patterson
ID: 34121376
What is the error?  
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

778 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