Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Getting return value of an executable

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
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 and create keystrokes 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.

809 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