A
Aziz
Hello I have a system where a customer can order a metallic alloy
product that is made from a variety of base metals. Every time the
customer adds an alloy to their shopping list the system works out how
much base metals are needed are deducts the relevant amount from the
stocks table.
I have this code which finds the stock level for a specific metal and
then reduces it by the necessary amount.
If baseNeeded >
CInt(dsTurbobraze.BaseMetalStocks.Rows(k).Item("BaseInStock")) Then
Exit Sub
dsDataset.BaseMetalStocks.FindByBaseMetalCode("Zinc").BaseInStock = _
(dsDataset..BaseMetalStocks.FindByBaseMetalCode(Zinc).BaseInStock) -
CType(baseNeeded, Integer)
First time I call this it works fine. But second time I call it, it
uses the original value (5000) rather than the new amount.
If I do a .Update command it works fine, but I don't want to save
changes to the Database until the order has actually been confirmed.
How can I save the changes to the Dataset in memory without saving to
the actual Database?
product that is made from a variety of base metals. Every time the
customer adds an alloy to their shopping list the system works out how
much base metals are needed are deducts the relevant amount from the
stocks table.
I have this code which finds the stock level for a specific metal and
then reduces it by the necessary amount.
If baseNeeded >
CInt(dsTurbobraze.BaseMetalStocks.Rows(k).Item("BaseInStock")) Then
Exit Sub
dsDataset.BaseMetalStocks.FindByBaseMetalCode("Zinc").BaseInStock = _
(dsDataset..BaseMetalStocks.FindByBaseMetalCode(Zinc).BaseInStock) -
CType(baseNeeded, Integer)
First time I call this it works fine. But second time I call it, it
uses the original value (5000) rather than the new amount.
If I do a .Update command it works fine, but I don't want to save
changes to the Database until the order has actually been confirmed.
How can I save the changes to the Dataset in memory without saving to
the actual Database?