Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Output Parameters Expand / Collapse
Author
Message
Posted Wednesday, December 24, 2008 8:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, December 24, 2008 2:11 PM
Points: 1, Visits: 3
Hi,

Is there no limit to stored procedure parameters because when I use ado.net I get the following when trying to call a stored procedure with 12 parameters:
Procedure or function GetItem has too many arguments specified.

I know this isn't a .net board but figured others may have run into this.

thanks.
Post #625398
Posted Wednesday, December 24, 2008 9:15 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:33 AM
Points: 7,081, Visits: 14,672
Andrew la Grange (10/26/2007)
I've got to agree with Jereme. I'm currently working on a legacy system which is FULL of OUTPUT Parameters (which sadly more often than not contain nothing of use on a regular basis, but that is more an architectural error), and it is a major pain, especially when wanting to quickly run an SP and you don't care/need the output param vars.


I'm not quite sure I understand that one. I run SP's with output parms all of the time without even givng them a parm to give back to me when I don't care about them.

To me - the main reason to use output parms is for when you want a scalar value out of the procedure. The execution status is for just that (whether the SP execute correctly or not) and it just doesn't make sense to make a recordset out of that. Of course - it becomes a different question when you want FIFTY scalar values......

EDIT: never mind - just noticed how old that was....:)


----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Post #625442
Posted Saturday, December 27, 2008 4:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:51 AM
Points: 14,788, Visits: 27,264
jpatevans4651 (12/24/2008)
Hi,

Is there no limit to stored procedure parameters because when I use ado.net I get the following when trying to call a stored procedure with 12 parameters:
Procedure or function GetItem has too many arguments specified.

I know this isn't a .net board but figured others may have run into this.

thanks.


There is a limit, I don't recall what it is off the top of my head, but it's available in Books Online. It's something like 256 I think, so 12 is not it.

That error means the procedure had 11, or less, parameters and you passed it too many.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #626121
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse