أنا عندي الأجراء المخزن هذا:
ALTER PROCEDURE [dbo].[EditDtlInvCome]
@ID_N int,
@NumberInv int,
@Mada varchar(200),
@Contity float,
@SinglePrice float,
@TotalPrice float
AS
BEGIN
UPDATE [ALTHIQADB].[dbo].[TabDtlsInvCom]
SET [NumberInv] = @NumberInv,
[Mada] = @Mada,
[Contity] = @Contity,
[SinglePrice] = @SinglePrice,
[TotalPrice] = @TotalPrice
WHERE ID_N = @ID_N
ENDوكود الاستدعاء في vb.net هذا
Dim SQLCon As SqlConnection = New SqlConnection(ModuleCon.PublicSQLCon)
Dim SQLComand As New SqlCommand()
SQLComand.Connection = SQLCon
SQLComand.CommandText = "EditDtlInvCome"
SQLComand.CommandType = CommandType.StoredProcedure
SQLComand.Parameters.Add("@NumberInv", SqlDbType.Int).Value = TxtIDInvo.Text
SQLComand.Parameters.Add("@Mada", SqlDbType.VarChar, 200).Value = DGV.CurrentRow.Cells(2).Value.ToString
SQLComand.Parameters.Add("@Contity", SqlDbType.Float).Value = DGV.CurrentRow.Cells(3).Value
SQLComand.Parameters.Add("@SinglePrice", SqlDbType.Float).Value = DGV.CurrentRow.Cells(4).Value
SQLComand.Parameters.Add("@TotalPrice", SqlDbType.Float).Value = DGV.CurrentRow.Cells(5).Value
'فتح الاتصال
SQLCon.Open()
SQLComand.ExecuteNonQuery()
SQLCon.Close()وتظهر لي المشكلة التالية
Procedure or function 'EditDtlInvCome' expects parameter '@ID_N', which was not supplied.
الرجاء المساعدة
مع العلم أن الحقل ID_N تلقائي ومفتاح أساسي