本文介绍了指定了太多参数。请帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

程序或函数P_UpdatePurchaseInv_test指定的参数太多。





Procedure or function P_UpdatePurchaseInv_test has too many arguments specified.


ALTER PROC [dbo].[P_DeleteForUpdatePurInvDet]
--Purchase Invoice Details       12 pic(13pic active)
  --@purid   int ,        
--@purinvid  varchar(255),      
@purinvdt  date,      
@invno   varchar(255),       
@invdt   date,       
@nrr   varchar(200),       
@partyIDpur  int,      
@invtypidpur int,      
@tottaxblamt decimal(18, 2),      
@nettaxamt  decimal(18, 2),      
@invamt   decimal(18, 2),      
@totalcgst  decimal(18, 2),      
@totalsgst  decimal(18, 2),      
@totaligst  decimal(18, 2),      
-------------------------------------      
--Purchase Invoice Sub Details --------16pic (18pic) active
@slno   int,        
@ItemIDpur  int,     
@ItemhsnID  int,      
@PDQty   int,        
@PDMRP   decimal(18, 2),        
@PDRate   decimal(18, 2),         
@PDdis   decimal(18, 2),         
@pdcgst   decimal(18, 2),         
@cgstamt  decimal(18, 2),         
@pdsgst   decimal(18, 2),         
@sgstamt  decimal(18, 2),         
@pdigst   decimal(18, 2),         
@igstamt  decimal(18, 2),         
@TaxableAmt  decimal(18, 2),         
@totaltaxamt decimal(18, 2),         
@PDAmount  decimal(18, 2),   
--@purdate date,     
-------STOCK----------- UPDATE------------        
@MRP decimal(7, 2),          
@prate decimal(7, 2),
@purinvid varchar(50),------------------------- Pass 
@itemid  int  --------------------------------- Pass
  as

  begin
  delete from TBL_pur_invdet where purinvid=@purinvid
  end
  
  begin
  insert into TBL_pur_invdet(purinvid,slno,ItemIDpur,PDQty,PDMRP,PDRate,PDdis,pdcgst,cgstamt,pdsgst,sgstamt,pdigst,igstamt,TaxableAmt,totaltaxamt,PDAmount,itemhsnid,purdate)          
  values(@purinvid,@slno,@ItemIDpur,@PDQty,@PDMRP,@PDRate,@PDdis,@pdcgst,@cgstamt,@pdsgst,@sgstamt,@pdigst,@igstamt,@TaxableAmt,@totaltaxamt,@PDAmount,@ItemhsnID,@invdt)          
  end
  
  begin
  update tbl_item set  MRP=@MRP,prate=@prate where itemid=@itemid    
  end
  
  begin
  update tbl_pur_inv set purinvid=@purinvid,purinvdt=@purinvdt,invno=@invno,invdt=@invdt,nrr=@nrr,partyIDpur=@partyIDpur,invtypidpur=@invtypidpur,tottaxblamt=@tottaxblamt,nettaxamt=@nettaxamt,invamt=@invamt,totalcgst=@totalcgst,totalsgst=@totalsgst,totaligst=@totaligst
  where purinvid=@purinvid 
  end





我的尝试:





What I have tried:

Public Function EditPurchaseinv() As DataSet ' Edit Purchase Invoice ------------------------------------------------------------------
            Dim db As New DBAccess
            db.AddParameter("@purinvid", purinvid)
            db.AddParameter("@purinvdt", purinvdt)
            db.AddParameter("@invno", invno)
            db.AddParameter("@invdt", invdt)
            db.AddParameter("@nrr", nrr)
            db.AddParameter("@partyIDpur", partyIDpur)
            db.AddParameter("@invtypidpur", invtypidpur)
            db.AddParameter("@tottaxblamt", tottaxblamt)
            db.AddParameter("@nettaxamt", nettaxamt)
            db.AddParameter("@invamt", invamt)
            db.AddParameter("@totalcgst", totalcgst)
            db.AddParameter("@totalsgst", totalsgst)
            db.AddParameter("@totaligst", totaligst)

            '------------------------------------------

            'db.AddParameter("@purinvid", purinvid)
            db.AddParameter("@slno", slno)
            db.AddParameter("@ItemIDpur", ItemIDpur)
            db.AddParameter("@ItemhsnID", ItemhsnID)
            db.AddParameter("@PDQty", PDQty)
            db.AddParameter("@PDMRP", PDMRP)
            db.AddParameter("@PDRate", PDRate)
            db.AddParameter("@PDdis", PDdis)
            db.AddParameter("@pdcgst", pdcgst)
            db.AddParameter("@cgstamt", cgstamt)
            db.AddParameter("@pdsgst", pdsgst)
            db.AddParameter("@sgstamt", sgstamt)
            db.AddParameter("@pdigst", pdigst)
            db.AddParameter("@igstamt", igstamt)
            db.AddParameter("@TaxableAmt", TaxableAmt)
            db.AddParameter("@totaltaxamt", totaltaxamt)
            db.AddParameter("@PDAmount", PDAmount)
            db.AddParameter("@purdate", purdate)
            '---------------STOCK UPDATE----------------------
            db.AddParameter("@itemid", itmid)
            db.AddParameter("@MRP", MRP)
            db.AddParameter("@prate", prate)
            'db.AddParameter("@QTY", QTY)

            Return db.ExecuteDataSet("P_UpdatePurchaseInv_test") 'P_UpdatePurchaseInv_test       P_UpdatePurchaseInv
        End Function

推荐答案

db.AddParameter("@purdate", purdate)


这篇关于指定了太多参数。请帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 03:28