Skip to content
Advertisement

Incorrect number of arguments for PROCEDURE… from C#

I am having trouble using parameters in a stored procedure. I believe I am not passing the parameters in correctly with the C#.

My code is roughly equivalent to:

Incorrect number of arguments for PROCEDURE tspos.get_customer; expected 2, got 0

The calls below work as expected, so I would imagine my issue is in the C#

Advertisement

Answer

I believe the name of your parameters should be prefixed with an @ sign:

Also, make sure to set the command type appropriately:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement