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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling AS400 program using ADO OLE DB connection

Status
Not open for further replies.

WP

Programmer
Nov 30, 1999
463
CH
Can anyone provied the syntax for calling a program ( no parameters ) on an AS400.

I'm using an ADO OLE DB connection routine.


Bill Paton
william.paton@ubsw.com
Check out my website !
 

Bill,

I'm using a middleware product called ActiveObjects which has an AS400 object with a RemoteCmd method. I stuff my AS/400 command as a parameter into the RemoteCmd method and it works like a charm. objAS400.Remotecmd "Call mylib/mypgm".

I'm not sure how to do it using the OLE/DB Provider. Actually, I thought ADO is related to "Data" access only!!! Can you actually use it to make program calls???

I assume you're using IBM's Client Access!


Tarek

The more I learn, the more I need to learn!
 
Tarek,

Sure you can. I just don't know the syntax. To be honest the whole syntax for CA AS400 OLE DB is pretty poor.

According to OLE DB can doalomost anything.

Here's another link:


Overall I'm pretty impressed at the transaction speed.

Not too impress with the syntax :(

My lack of knowledge of the ADO model only adds to my struggle !

Thanks anyway.

When I get the syntax ( please someone beat me to it ) I will post it.


Bill Paton
william.paton@ubsw.com
Check out my website !
 
Not too difficult after all:

Dim obj400ADOConn As New ADODB.Connection
Dim obj400ADOcmd As New ADODB.Command

obj400ADOConn.Open "Provider=IBMDA400;Data Source=" & txtAS400 & ";", txt400UserID, txt400Password

Set obj400ADOcmd.ActiveConnection = objDB2ADOConn

obj400ADOcmd.CommandText = "{{Call WPTLIB/WSSYNC1C}}"
obj400ADOcmd.Execute

Bill Paton
william.paton@ubsw.com
Check out my website !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top