× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: Using RPG programs as stored procedures via CA Express OLEDB
  • From: Chris Bipes <rpg@xxxxxxxxxxxxxxx>
  • Date: Thu, 30 Mar 2000 07:17:07 -0800

Just a thought since I have not tried this.  But the user IDs and Passwords on the AS400 are all Upper Case.  Perhaps until the Exec statement the logon is not verified?  Just guessing here.
 

Christopher K. Bipes     mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst   mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.         http://www.cross-check.com
6119 State Farm Drive    Phone: 707 586-0551 x 1102
Rohnert Park CA  94928 Fax: 707 586-1884

If consistency is the hobgoblin of little minds, only geniuses work here.  Karen Herbelin - Readers Digest 3/2000

-----Original Message-----
From: Walden H. Leverich [mailto:WaldenL@techsoftinc.com]
Sent: Wednesday, March 29, 2000 3:16 PM
To: MIDRANGE-L@midrange.com
Subject: Using RPG programs as stored procedures via CA Express OLEDB

All,
 
Has anyone successfully called an RPG program from VB (or ASP) using the RPG program as a stored procedure? I'm using the following code, but I receive an error  80070057 ("The parameter is incorrect"). I have created the stored proc in SQL on the 400 and there are no error messages in the QZDASOINIT job on the 400.
 
Thanks,
 
-Walden
 
------------Sample Code ----------------
Dim cn As Connection
Dim cm As Command
 
Set cn = New ADODB.Connection
Set cm = New ADODB.Command
 
cn.Open "Provider=IBMDA400;Data Source=thorin", "Walden", "xxxx" (Obviously the correct password here)
 
cn.Execute "call techgen.setup" 'Sets library list
 
cm.ActiveConnection = cn
cm.Prepared = True
cm.CommandText = "TECHGEN.TSA0XFR"  'So much for setting library list
cm.CommandType = adCmdStoredProc

cm.Parameters.Append cm.CreateParameter("@Rtn", adChar, adParamOutput, 7)
cm.Parameters.Append cm.CreateParameter("@ID", adNumeric, adParamOutput, 7)
cm.Parameters.Append cm.CreateParameter("@Name", adChar, adParamInput, 50)
cm.Parameters.Append cm.CreateParameter("@Code", adChar, adParamInput, 6)
 
cm.Parameters("@Name") = "G"
cm.Parameters("@Code") = "G"
 
cm.Execute  '*****CODE FAILS HERE
 
---------------End of Code ------------------

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.