sql server - Procedure or function 'sp_InsertImages' expects parameter '@Img_path', which was not supplied -


i have passed img_path in code nd procedure show me error please me. procedure :

create proc sp_insertimages (   @img_path nvarchar(max),   @product_id numeric(18,0),   @iscover_img bit ) begin if(select count(*) tbl_productimg product_id=@product_id)<5 begin insert tbl_productimg(img_path,product_id,iscover_img)values(@img_path,@product_id,@iscover_img) select @@identity end else begin select -1 end end 

enter image description here

your command type must set storedprocedure this

cmd.commandtype = commandtype.storedprocedure; 

to product id procedure, call executescalar() instead of executenonquery() below

 product_id = convert.todouble(sql.executescalar()); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -