Midrange News for the IBM i Community


Posted by: GL Slone
Stored Procedure Call from .NET
has no ratings.
Published: 29 Jul 2014
Revised: 17 Sep 2014 - 1009 days ago
Last viewed on: 22 Jun 2017 (2352 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Stored Procedure Call from .NET Published by: GL Slone on 29 Jul 2014 view comments(5)

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Stored Procedure Call from .NET
Posted: 2 years 10 months 24 days 15 hours 58 minutes ago
Edited: Tue, 29 Jul, 2014 at 17:05:00 (1059 days ago)

You may want to have a look at how the PARAMETERS are defined in your stored procedure. If they're being called by native IBM i SQL, that's one thing, but if they're being called by .NET you may need to have some SQL standard parameter convention specified.  Typically this means "PARAMETER STYLE GENERAL"

I'm no Stored Procedure expert and in fact, I've only written SQL functions using RPG or SQL, never a Stored Procedure, but it sounds like a familiar story.

Posted by: Ringer
Premium member *
Comment on: Stored Procedure Call from .NET
Posted: 2 years 10 months 23 days 20 hours 23 minutes ago

Show us your CREATE PROCEDURE statement. Bob is right, the parmeter style affects the parms required. Are you able to successfully call the SP from iSeries Navigator? 

Chris Ringer

Posted by: Midnite1
Premium member *
Comment on: Stored Procedure Call from .NET
Posted: 2 years 9 months 8 days 7 minutes ago

Sorry i did not circle back. We found that the problem was with the inherited library list  when the .NET program. We were not seeing it and the SP was blowing up and returning zeros/blanks.

Bob/Chris, thanks for your responses. the Create Proc stmt was solid. Thats why it was so confusing. And I got no help from my .NET programmer. His standard response was, and is, "the problem must be on the AS400, because my program is fine". The problem was i the fuzzy MS server area between .NET and AS400. It was actually a poster on another forum that pointed me to the resolution.

 

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Stored Procedure Call from .NET
Posted: 2 years 9 months 7 days 23 hours 50 minutes ago

You don't mean this do you? Library List and SQL Functions

The situation might be slightly different from yours but was the solutions the one you're talking about?

Posted by: Midnite1
Premium member *
Comment on: Stored Procedure Call from .NET
Posted: 2 years 9 months 5 days 23 hours 30 minutes ago

Yes. This is the case. Your linked post hit the nail on the head. Thanks. Now we know what to do when we encounter this error with other remote systems, not just .NET