Hello everybody,
I have to call a procedure inside while loop.
But while doing this, it is working first time inside loop.
from second time onwards, it displays an error as,
“Procedure or function proc_User_Statistics has too many arguments specified”
I had called the procedure as follows.
While objdrStatList.Read
TotalRec = objdrStatList(0)
CustomerCode = objdrStatList(1)
UserId = objdrStatList(2)
NetworkId = objdrStatList(3)
Dim TotalCredits = objdrStatList(4)
objUserStat.Connection = objcon1.objConnection
objUserStat.CommandType = CommandType.StoredProcedure
objUserStat.CommandText = “proc_User_Statistics”
objUserStat.Parameters.Add(“@StatDate”, SqlDbType.VarChar).Value = strDate
objUserStat.Parameters.Add(“@Records”, SqlDbType.Int).Value = TotalRec
objUserStat.Parameters.Add(“@CustomerCode”, SqlDbType.VarChar).Value = CustomerCode
objUserStat.Parameters.Add(“@UserId”, SqlDbType.VarChar).Value = UserId
objUserStat.Parameters.Add(“@NetworkId”, SqlDbType.VarChar).Value = NetworkId
objUserStat.Parameters.Add(“@TotalCredits”, SqlDbType.Int).Value = TotalCredits
objUserStat.ExecuteNonQuery()
objUserStat.Dispose()
objcon1.CloseConnection()
End While
Pls suggest me a solution. It is very urgent.
Thanks
Siva (