Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call RPG program from VBA

Status
Not open for further replies.

botatun

Programmer
Mar 7, 2006
40
US
I need store some data from Excel in as400 file
I use this code:

cmMYSQLCMD.CommandText =
"call vrlib.ITEMBSR02 ("' & sAs4Param & ')"
'execute the SQL query
Set rs_Update_BSR_Level = cmMYSQLCMD.Execute()


It is work fine. Now I need return text message as additional parameter for ITEMBSR02.

How to declare parameters instead of hard coding them
- to get an output?
That I can do something like that:

cmMYSQLCMD.CommandText =
"call vrlib.ITEMBSR02 ( Item, Error)"
MsgBox Error
[/code]




 
I think you will have to open a recordset using your query to fill it. I don't know the first thing about RPG or AS400's, but I imagine if you can execute the query using an ADO command you can return a recordset from it.

Have a look here:
Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top