Too many args when running a stored procedure



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()



.



Relevant Pages

  • Re: Too many args when running a stored procedure
    ... 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. ... (JobRefNum) ... (@JobNumber) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Too many args when running a stored procedure
    ... > ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, ... >> What's the exact error message text you're receiving? ... >>> the primary key only and work up from there but the primary key insert ... >>> didnt work either. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: PK fields on a table
    ... The Primary Key is indexed to a Block Storage/Memory Address in a seperate table, ... What does matter is the size of the Primary Key field, ...
    (microsoft.public.sqlserver.programming)
  • Re: Too many args when running a stored procedure
    ... Mark ... >> the primary key only and work up from there but the primary key insert ... >> didnt work either. ... >> ALTER PROCEDURE dbo.AddJob ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Identify selected row in the DataGrids underlying datatable...
    ... Forgot to mention that this a Windows App and that it doesn't really matter ... how I do this as long as I get the Primary key columnof the row that is ...
    (microsoft.public.dotnet.framework.adonet)