Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2004, 05:06 PM
Authorized User
 
Join Date: Feb 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Max Arguments Sent to Stored Procedure?

Is there a maximum number of arguments that can be passed to a stored procedure?

I received "Procedure or function sp_UpdateEntity has too many arguments specified" after calling a stored procedure from a Web form.

Thank you.


 
Old February 20th, 2004, 05:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Not that I know of.
The error is indicating that you're passing more parameters than the stored procedure expects. Check your code and see how and how many parameters you specify.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old February 20th, 2004, 06:19 PM
Authorized User
 
Join Date: Feb 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That was it. Thanks!

 
Old June 15th, 2006, 10:15 AM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know this is an old post, but I hope someone can help me. I am getting the error "has too many arguments specified" for a stored procedure that I call, but only after the first time I call it. The first time it works fine. I reduced my number of arguments to four for testing and checked all the code. I am using vb6.net and a clsSQLDatabase that I have used successfully before. Here is my code:
Dim WithEvents lobj As New clsSQLDatabase
        Try
            lobj.ConnectionString = ConnectionString
            lobj.OpenDBConnection()
            lobj.BuildNewSQLCommand("UpdateMostWantedParents42 1")
            lobj.AddParameterToSQLCommand(SqlDbType.Int, "@id", curID, ParameterDirection.Input)
            lobj.AddParameterToSQLCommand(SqlDbType.Char, "@LastName", txtLName.Text, ParameterDirection.Input)
            lobj.AddParameterToSQLCommand(SqlDbType.Char, "@FirstName", txtFName.Text, ParameterDirection.Input)
            lobj.AddParameterToSQLCommand(SqlDbType.Char, "@MName", txtMiddle.Text, ParameterDirection.Input)
            lobj.ExecuteStoredProcedure()
        Catch ex As Exception
            Label1.Text = ex.ToString
  End Try
It seems as if I need to clear out the object lobj or something. Any ideas?
Thanks,
Linda






Similar Threads
Thread Thread Starter Forum Replies Last Post
Procedure or function has too many arguments Raby VB Databases Basics 6 November 16th, 2007 11:38 AM
Stored Procedure jezywrap SQL Server ASP 1 January 3rd, 2007 12:29 AM
stored procedure keyvanjan Classic ASP Basics 2 May 26th, 2006 01:16 AM
storage PROCEDURE arguments question? AFei Classic ASP Databases 4 September 24th, 2004 04:35 AM
Stored Procedure help flyin SQL Server 2000 4 August 3rd, 2004 07:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.