Solved

Getting return value of an executable

Posted on 2004-09-26
6
409 Views
Last Modified: 2013-12-26
HI,

I have a powerbuilder program connecting to AS400 machine. From this program, I run an executable to connect to AS400 database. But, if the user id/password is wrong, I get a popup message from AS400 machine directly and if user enters it correctly, I am unable to capture this new id/pwd in order to use in subsequent windows.
So we have thought of following solution:
1) Find anyway to suppress the message from As400.
2) Get the return value of the executable, and re-connect to AS400.

Can anyone tell me whether this is possible.

Regards
0
Comment
Question by:cknishad
6 Comments
 
LVL 18

Accepted Solution

by:
diasroshan earned 168 total points
ID: 12166546
hi,

Solution 1:
i do not know much abt AS400, but i have a query....
can u send the new id/pwd entered by the user in AS400 to an ini file(any text file named as an ini extention)...so the PB application can pick it from there for subsequent logins...

Solution 2:
Can u try and suppress the message from AS400... if u can do that then show a PB application login screen and accept new id/pwd... send this to an ini file and ur AS400...
u can copy new id/pwd to an ini file created by u by using the function SetProfileString()...


Dont know much abt AS400 so going by assumptions...

Cheers,
Rosh
0
 
LVL 1

Assisted Solution

by:AxfordA
AxfordA earned 166 total points
ID: 12319706
Do not try to connect to the AS400 using the password and user id entered. Use a preset valid user and password combination, to connect to the DB (restricted), that allows you to validate the currently entered user Id and password, after verfification disconnect from the DB. If the user/password combination is valid go ahead and make the connections, using the entered value, otherwise ask for new password until your happy.

Cheers
Alan
0
 
LVL 4

Assisted Solution

by:Bhatti
Bhatti earned 166 total points
ID: 12335107
Never use the ini file for ID/Password etc.

Use the Idle Event of the Application.

Best regards

Bhatti
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

759 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

19 Experts available now in Live!

Get 1:1 Help Now