SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


too many arguments - but they match


too many arguments - but they match

Author
Message
danaanderson
danaanderson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 185
I am getting an error in a stored procedure saying too many arguments are specified. I am using a FormView in ASP.NET (VB.NET) on the web page. The parameters list matches exactly the parameters in the stored procedure. I can't understand what is wrong. In Visual FoxPro I could check the number of parameters that were actually passed to a procedure. I can't find an equivalent funtion in SQL Server. It was a great help in VFP years ago. I find it odd that I can't do the same thing in this "superior product".


<UpdateParameters>
<aspTonguearameter Name="nProductID" Type="Int32" />
<aspTonguearameter Name="cProductTitle" Type="String" />
<aspTonguearameter Name="nCategory3D" Type="Byte" />
<aspTonguearameter Name="nSecondaryCat" Type="Byte" />
<aspTonguearameter Name="cReadMe" Type="String" />
<aspTonguearameter Name="nNumberOfFiles" Type="Byte" />
<aspTonguearameter Name="cLongDesc" Type="String" />
<aspTonguearameter Name="nPrice" Type="Decimal" />
<aspTonguearameter Name="nSalePrice" Type="Decimal" />
<aspTonguearameter Name="nPercentOff" Type="Int32" />
<aspTonguearameter Name="lOnSale" Type="Boolean" />
<aspTonguearameter Name="lFreebie" Type="Boolean" />
<aspTonguearameter DbType="Datetime" Name="dSaleStart" />
<aspTonguearameter DbType="Datetime" Name="dSaleEnd" />
<aspTonguearameter Name="cFeatures" Type="String" />
<aspTonguearameter Name="cRequirements" Type="String" />
<aspTonguearameter Name="nSoftwareRequirements" Type="Byte" />
<aspTonguearameter Name="nDAZversion" Type="Byte" />
<aspTonguearameter Name="nPoserVersion" Type="Byte" />
<aspTonguearameter Name="nBryceVersion" Type="Byte" />
<aspTonguearameter Name="nCarraraVersion" Type="Byte" />
<aspTonguearameter Name="cOtherVersions" Type="String" />
<aspTonguearameter Name="lShadersOnly" Type="Boolean" />
<aspTonguearameter Name="cMarketingCredits" Type="String" />
<aspTonguearameter Name="nModelRequired" Type="Byte" />
<aspTonguearameter Name="cOtherModel" Type="String" />
<aspTonguearameter Name="lUpdated" Type="Boolean" />
<aspTonguearameter DbType="Datetime" Name="dUpdateDate" />
</UpdateParameters>




ALTER PROCEDURE [dbo].[MyUpdateCode] --not the actual name of the procedure
@nProductID int,
@cProductTitle varchar(75),
@nCategory3D tinyint,
@nSecondaryCat tinyint,
@cReadMe text,
@nNumberOfFiles tinyint,
@cLongDesc varchar(2000),
@nPrice decimal,
@nSalePrice decimal,
@nPercentOff int,
@lOnSale bit,
@lFreebie bit,
@dSaleStart datetime,
@dSaleEnd datetime,
@cFeatures text,
@cRequirements text,
@nSoftwareRequirements tinyint,
@nDAZversion tinyint,
@nPoserVersion tinyint,
@nBryceVersion tinyint,
@nCarraraVersion tinyint,
@cOtherVersions varchar(500),
@lShadersOnly bit,
@cMarketingCredits varchar(1000),
@nModelRequired tinyint,
@cOtherModel varchar(50),
@lUpdated bit,
@dUpdateDate datetime

AS
BEGIN



Help?

Dana
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)

Group: General Forum Members
Points: 84695 Visits: 41069
Heh... Join the crowd... everyone always has some gripe when they have to make a change in what they're using. ;-) You being an ol' FoxPro user makes it even more difficult because it was a great product that they discontinued. I'm still griping because they took away the functionality that used to lie under the {f4} key and because they took away sp_MakeWebtask.

Anyway, using the built in Windows functionality of an {alt]{click}{drag} to copy one set next to another, I was able to quickly verify that you're correct... they do, indeed, match line for line.


<aspTonguearameter Name="nProductID" Type="Int32" /> @nProductID int,
<aspTonguearameter Name="cProductTitle" Type="String" /> @cProductTitle varchar(75),
<aspTonguearameter Name="nCategory3D" Type="Byte" /> @nCategory3D tinyint,
<aspTonguearameter Name="nSecondaryCat" Type="Byte" /> @nSecondaryCat tinyint,
<aspTonguearameter Name="cReadMe" Type="String" /> @cReadMe text,
<aspTonguearameter Name="nNumberOfFiles" Type="Byte" /> @nNumberOfFiles tinyint,
<aspTonguearameter Name="cLongDesc" Type="String" /> @cLongDesc varchar(2000),
<aspTonguearameter Name="nPrice" Type="Decimal" /> @nPrice decimal,
<aspTonguearameter Name="nSalePrice" Type="Decimal" /> @nSalePrice decimal,
<aspTonguearameter Name="nPercentOff" Type="Int32" /> @nPercentOff int,
<aspTonguearameter Name="lOnSale" Type="Boolean" /> @lOnSale bit,
<aspTonguearameter Name="lFreebie" Type="Boolean" /> @lFreebie bit,
<aspTonguearameter DbType="Datetime" Name="dSaleStart" /> @dSaleStart datetime,
<aspTonguearameter DbType="Datetime" Name="dSaleEnd" /> @dSaleEnd datetime,
<aspTonguearameter Name="cFeatures" Type="String" /> @cFeatures text,
<aspTonguearameter Name="cRequirements" Type="String" /> @cRequirements text,
<aspTonguearameter Name="nSoftwareRequirements" Type="Byte" /> @nSoftwareRequirements tinyint,
<aspTonguearameter Name="nDAZversion" Type="Byte" /> @nDAZversion tinyint,
<aspTonguearameter Name="nPoserVersion" Type="Byte" /> @nPoserVersion tinyint,
<aspTonguearameter Name="nBryceVersion" Type="Byte" /> @nBryceVersion tinyint,
<aspTonguearameter Name="nCarraraVersion" Type="Byte" /> @nCarraraVersion tinyint,
<aspTonguearameter Name="cOtherVersions" Type="String" /> @cOtherVersions varchar(500),
<aspTonguearameter Name="lShadersOnly" Type="Boolean" /> @lShadersOnly bit,
<aspTonguearameter Name="cMarketingCredits" Type="String" /> @cMarketingCredits varchar(1000),
<aspTonguearameter Name="nModelRequired" Type="Byte" /> @nModelRequired tinyint,
<aspTonguearameter Name="cOtherModel" Type="String" /> @cOtherModel varchar(50),
<aspTonguearameter Name="lUpdated" Type="Boolean" /> @lUpdated bit,
<aspTonguearameter DbType="Datetime" Name="dUpdateDate" /> @dUpdateDate datetime



I don't even know how to spell "ASP" but I did notice that some of the lines of ASP code have the Name and DBType attributes reversed and don't know if that would be the cause of the problem or not, but thought it might be worth mentioning just in case it is.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)

Group: General Forum Members
Points: 84695 Visits: 41069
Again, I don't know ASP but if any of the parameters aren't populated, is ASP still smart enough to send all of the parameters?

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
danaanderson
danaanderson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 185
I don't think that it matters about the position in the parameter of the dbtype spec, but I'll check it out. It is ASP.NET. Classic ASP is quite a different animal. In any case, from what I know this error is indicating that more parameters were sent than the procedure has receptors for...but it is ambiguous. I really wish T-SQL had a function like PARAMETERS() in VFP. I could know for sure.

Anyone else have any thoughts? It's surprising that there was only one person replying in a time span of about 23 hours.

Dana
danaanderson
danaanderson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 185
I just swapped those two dbType attributes to the end like all the other type attributes in the parameters and it didn't make a difference.

Dana
J Livingston SQL
J Livingston SQL
SSCertifiable
SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)

Group: General Forum Members
Points: 5389 Visits: 35285
danaanderson (5/25/2014)


Anyone else have any thoughts? It's surprising that there was only one person replying in a time span of about 23 hours.



not sure what you expect from a volunteer forum..........???

anyways...I know nothing about ASP but a quick google came up with this and others like it on SO.

http://stackoverflow.com/questions/14712451/procedure-or-function-xyz-has-too-many-arguments-specified

it may help...may not.....

________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day

Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)

Group: General Forum Members
Points: 84695 Visits: 41069
danaanderson (5/25/2014)
I don't think that it matters about the position in the parameter of the dbtype spec, but I'll check it out. It is ASP.NET. Classic ASP is quite a different animal. In any case, from what I know this error is indicating that more parameters were sent than the procedure has receptors for...but it is ambiguous. I really wish T-SQL had a function like PARAMETERS() in VFP. I could know for sure.

Anyone else have any thoughts? It's surprising that there was only one person replying in a time span of about 23 hours.

Dana


Heh... it IS an SQL Server forum with a large number of people that live in the United states and you've asked an ASP question on a holiday weekend. ;-)

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Matt Miller (4)
Matt Miller (4)
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12111 Visits: 18567
Have you tried look at the profiler session of the parameters being passed in? Also - have you made sure that there is in fact only ONE stored proc with that specific name (e.g. myuser.StoredProc and dbo.StoredProc)? If the ASP is using a specific user account it might not be using the default schema.

On profiler: start a session recording, then fire your ASP call at it - you should be able to see what it being passed in.

----------------------------------------------------------------------------------
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?
danaanderson
danaanderson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 185
J Livingston SQL (5/25/2014)
danaanderson (5/25/2014)


Anyone else have any thoughts? It's surprising that there was only one person replying in a time span of about 23 hours.



not sure what you expect from a volunteer forum..........???

anyways...I know nothing about ASP but a quick google came up with this and others like it on SO.

http://stackoverflow.com/questions/14712451/procedure-or-function-xyz-has-too-many-arguments-specified

it may help...may not.....


Well, what I expected was some responses...I see a lot of helpfulness here. That's why it was my first choice to post the question here.

Thank you, I did Google this issue...and saw some things at stackoverflow...but they weren't that one. many times when I go to that site I see things that aren't helpful, that are about different circumstances entirely, or even often have no replies at all. Once in a while I see something that is actually helpful to me. This one was that...it was exactly the answer! Thank you again!

Dana
danaanderson
danaanderson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 185
Jeff Moden (5/25/2014)
danaanderson (5/25/2014)
I don't think that it matters about the position in the parameter of the dbtype spec, but I'll check it out. It is ASP.NET. Classic ASP is quite a different animal. In any case, from what I know this error is indicating that more parameters were sent than the procedure has receptors for...but it is ambiguous. I really wish T-SQL had a function like PARAMETERS() in VFP. I could know for sure.

Anyone else have any thoughts? It's surprising that there was only one person replying in a time span of about 23 hours.

Dana


Heh... it IS an SQL Server forum with a large number of people that live in the United states and you've asked an ASP question on a holiday weekend. ;-)


Well, it was SQL Server that was throwing the error. I thought it was the best place to start looking...and asking. True, though, it is a holiday weekend and most are probably out firing up the barbie.

Dana
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search