473,394 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Procedure or function usp_tCode has too many arguments

Hi all ,
My stored proc is as follows
if @Code Is Null
BEGIN
SELECT * FROM TCode (NOLOCK)

END

Else
BEGIN
SELECT * FROM TCode(NOLOCK) where Code LIKE @Code
END

and in the ASP page i have written as

Sql = usp_tCode " _
& "@Code=" & dbQuoteOrNull(Code) & ", " _
& "@FInd =" & dbQuoteOrNull(FInd) & ", " _
& "@SInd = " & dbQuoteOrNull(SInd) & " , " _
& "@HIInd = " & dbQuoteOrNull(HInd) & " , " _
& "@AInd = " & dbQuoteOrNull(AInd) & " , " _
& "@CInd = " & dbQuoteOrNull(CInd) & " , " _
& "@BInd = " & dbQuoteOrNull(BInd) & " , " _
& "@MInd = " & dbQuoteOrNull(MInd) & " , " _
& "@SHO =" & dbQuoteOrNull(SHO) & " "


Im gettin the error as Procedure or function usp_tCode has too many arguments
So this means tht there r too many arguments ? so i should chnage the Stored proc or the ASP cpde. Please help

thanks in advance
Nov 13 '07 #1
2 1470
shweta123
692 Expert 512MB
Hi,

I think , the error is coming at the line where you are calling the stored procedure. Please refer this Article at "http://support.microsoft.com/kb/q164485/" , it explains how to call a stored procedure using ASP.



Hi all ,
My stored proc is as follows
if @Code Is Null
BEGIN
SELECT * FROM TCode (NOLOCK)

END

Else
BEGIN
SELECT * FROM TCode(NOLOCK) where Code LIKE @Code
END

and in the ASP page i have written as

Sql = usp_tCode " _
& "@Code=" & dbQuoteOrNull(Code) & ", " _
& "@FInd =" & dbQuoteOrNull(FInd) & ", " _
& "@SInd = " & dbQuoteOrNull(SInd) & " , " _
& "@HIInd = " & dbQuoteOrNull(HInd) & " , " _
& "@AInd = " & dbQuoteOrNull(AInd) & " , " _
& "@CInd = " & dbQuoteOrNull(CInd) & " , " _
& "@BInd = " & dbQuoteOrNull(BInd) & " , " _
& "@MInd = " & dbQuoteOrNull(MInd) & " , " _
& "@SHO =" & dbQuoteOrNull(SHO) & " "


Im gettin the error as Procedure or function usp_tCode has too many arguments
So this means tht there r too many arguments ? so i should chnage the Stored proc or the ASP cpde. Please help

thanks in advance
Nov 14 '07 #2
jhardman
3,406 Expert 2GB
Im gettin the error as Procedure or function usp_tCode has too many arguments
So this means tht there r too many arguments ? so i should chnage the Stored proc or the ASP cpde. Please help

thanks in advance
I think you may have a syntax error. What is usp_tCode?

Jared
Nov 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Wonderinguy | last post by:
Hi everybody , I have been trying to execute a simple DB2 stored Procedure from perl. But it doesn't work. Could anybody please help me find out why this is happening : here is my perl script...
1
by: Child | last post by:
Hi, I am getting the error: "Procedure or function spAddActivity has too many arguments specified. " on a stored procedure insert. I compared the number of parameters in the function and the SP...
22
by: M K | last post by:
Heres my SP: ( i am trying to add more than 1 field but get the same error no matter how many i try to add, i thought i would try to insert the primary key only and work up from there but the...
0
by: Mike P | last post by:
I am using a SqlDataSource with a GridView and stored proc, and I have specified exactly the same update parameters for the SqlDataSource in exactly the same order as my stored proc. Yet I keep...
1
by: jkeel | last post by:
If I try to Update a record with the following code using a stored procedure I get an error: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$...
3
by: mnarewec | last post by:
Please assist me: This erorr message is produce when calling the stored procedure in vb.net Procedure AutomateMatterNumber has no parameters and arguments were supplied." MS SQL 2000stored...
0
by: wmos4995 | last post by:
Hi, I am writing a procedure to alter the value of a sequence to max value of the table column. This is what i have written till now. CREATE PROCEDURE RESET_SEQ ( IN TABNAME VARCHAR(50),...
0
by: SOI_0152 | last post by:
Hi all! Happy New Year 2008. Il hope it will bring you love and happyness I'm new on this forum. I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c. Everything works...
1
by: speranza | last post by:
i have multiple checkboxes on my form.i am trying to add them with stored procedure but it gives me Procedure or function konut_ekle has too many arguments specified protected void...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.