Solved

Getting return value of an executable

Posted on 2004-09-26
6
434 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
[X]
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
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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 column That will then direct you to their download page. From that p…
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 NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

728 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