How do I fix this error?

I have the Update in the TableAdapter use a sp. One of the Parameters is CustomerID, which is set as Input. Now when this sp tries to execute I am getting an error. This is the error:
>Formal parameter '@CustomerID' was defined as OUTPUT but the actual parameter not declared OUTPUT

I'm not sure what is mean by "Formal" and "Actual".  Is this difficult to fix?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
formal/actual is the difference between how the parameter is defined in the procedure vs how you define it in your .net code.
>One of the Parameters is CustomerID, which is set as Input.
so, the procedure probably defines it as OUTPUT parameter, so you have to adjust the .net code accordingly.

if that is not clear enough, post the relevant code.
Lisa0812Author Commented:
but in the Procedure it is not defined as Output, here is the procedure:

CREATE PROCEDURE dbo.spCustomer_Update

      @CustomerName varchar(40),
      @Address varchar(90),
      @City varchar(30),
      @State char(2),
      @Zip varchar(10),
      @Phone varchar(20),
      @Fax varchar(20),
      @Website varchar(60),
      @Email varchar(50),
      @Comment varchar(4096),
      @CustomerID int,
      @Modified Timestamp OUTPUT
Pratima PharandeCommented:
I think formal means delcared in code

actual means in store proc

In this you have declare culstomerid as output in code so remove that...

otherwise share your code with us
David ToddSenior DBACommented:

>> but in the Procedure it is not defined as Output


But the procedure shows that the next parameter is declared as output
>> @Modified Timestamp OUTPUT

I would hazard a guess that maybe you have @CustomerID declared as output in .net, or @Modified is not defined as output and should be.

Did you write the procedure? Is it an existing procedure used by other code, or a new procedure?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lisa0812Author Commented:
I found the problem.
In fact I had set it using the designer and the CustomerID originally had been set as InputOutput and I had changed it, and it shows as such in the Designer. But the Code it write didn't change. So I went in and changed it by hand, and now it seems to work.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.