Too many args when running a stored procedure
- From: "M K" <ski_freak@xxxxxxxxx>
- Date: Thu, 15 Sep 2005 22:40:22 GMT
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 primary key insert didnt work
either. I can run the SP manually in Visual Studio .NET and it works. When
i try to do this it doesn't.
Any help is greatly appreciated... newbie here as well so please be gentle
:)
ALTER PROCEDURE dbo.AddJob
@JobNumber varchar(30)
AS
INSERT INTO [Jobs].[dbo].[Job]
(JobRefNum)
VALUES
(@JobNumber)
Code:
SqlCommand1.CommandType = CommandType.StoredProcedure
SqlCommand1.CommandText = "Jobs.dbo.AddJob"
SqlCommand1.Parameters.Add("@JobNumber", txtJobRefNumber.Text)
SqlCommand1.ExecuteNonQuery()
.
- Follow-Ups:
- Re: Too many args when running a stored procedure
- From: Cor Ligthert [MVP]
- Re: Too many args when running a stored procedure
- From: Michael C#
- Re: Too many args when running a stored procedure
- From: Chris
- Re: Too many args when running a stored procedure
- Prev by Date: Re: Add Event Handler to array of controls?
- Next by Date: Re: Cancelling form load event
- Previous by thread: Free crm
- Next by thread: Re: Too many args when running a stored procedure
- Index(es):
Relevant Pages
|