I have a stored procedure as followes
Create PROCEDURE [dbo].[spInventoryOverride]
SET NOCOUNT ON;
DECLARE @ProdID int
SELECT @ProdID = dbo.ProductVariant.VariantID FROM dbo.Product INNER JOIN dbo.ProductVariant ON dbo.Product.ProductID = dbo.ProductVariant.ProductID WHERE (dbo.ProductVariant.SKUSuffix = @Sufix) AND (dbo.Product.SKU = @Prefix)
SET Inventory = @Total
WHERE (VariantID = @ProdID)
I then Have a loop to go though an array and get the prefix/suffix and the inventory total and send it to this SP to be updated.
The problem is only the first record (first time the loop goes arround) the record gets updated. The second time and so on I am sure the data is good (as it should find the record to be updated just fine) but it will not update that record. (am using SQL 2008, VS.NET 2008, Asp.net 2.0, VB.NET)
What am I doing wrong?
Any help would be greatly appreciated :)
View Complete Post