Solved

Getting return value of an executable

Posted on 2004-09-26
6
419 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

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

11 Experts available now in Live!

Get 1:1 Help Now