Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
how to save multiple image using single parameter in asp.net web application?
I have to create a store procedure.. bt i want to save multiple image by single parameter.


What I have tried:

When i click save button then show sql exception "Procedure or function sp_ConceptStageImageSave has too many arguments specified." i want to solve this problem.
Posted
Updated 7-May-16 21:05pm
Comments
Karthik_Mahalingam 8-May-16 2:09am    
Post your relevant code with more information

1 solution

When you call a stored procedure, you have to pass the same number of parameters as you declared it with, unless you specify a default value. So if you want to pass multiple values, you could allow for (say) three parameters, all NULL default, and only pass one "real" value. Your SP then checks for NULL and hadles it appropriately.
However, that is not very flexible.
A better approach might be to pass a Table Value Parameter: Table Value Parameters in SQL Server 2008 and .NET (C#)[^] and pass that; it allows your code to pass a (virtually) unlimited number of images.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900