Solved

Getting return value of an executable

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

920 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

14 Experts available now in Live!

Get 1:1 Help Now