×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Walden,

Have you tried using OpsNav to declare the procedure?  This is the method
that I use, and I've never had a problem with it.

Once declared, I use the Stored Procedures Wizard that is shipped with the
CA Express Toolkit in order to generate the connection code, then I just
tweak it were necessary.


Regards,

John Taylor
Canada


----- Original Message -----
From: "Walden H. Leverich" <WaldenL@techsoftinc.com>
To: <MIDRANGE-L@midrange.com>
Sent: Thursday, March 30, 2000 07:29
Subject: RE: Using RPG programs as stored procedures via CA Express OLEDB


> It doesn't help, and cm should be nothing before it is initialized anyway.
> Any other ideas?
>
> If anyone has an example I'd love to see it. How did you describe the
> procedure on the 400? I described it as it really is -- chars with their
> length and Decimals with their scale, not their length (that is a 7.2
> decimal is described as a 7.2 not as a 4 even though it is only 4 bytes
> long.)
>
> -Walden
>
> -----Original Message-----
> From: Eric N. Wilson [mailto:doulos1@home.com]
> Sent: Wednesday, March 29, 2000 11:45 PM
> To: MIDRANGE-L@midrange.com
> Subject: Re: Using RPG programs as stored procedures via CA Express
> OLEDB
>
>
> You may wish to set the cm object to nothing first as I am almost positive
> that is your problem. I generally use a separate ADODB.Command object for
> each command.
>
> ______________________________________________
> Eric N. Wilson
> President
> Doulos Software & Computer Services
> 2913 N Alder St.
> Tacoma WA 98407
>
>
> ----- Original Message -----
> From: "Walden H. Leverich" <WaldenL@techsoftinc.com>
> To: <MIDRANGE-L@midrange.com>
> Sent: Wednesday, March 29, 2000 3:16 PM
> 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 ------------------
> >
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.