Refresh Record - SP Calc Field
Posted: Fri 16 Aug 2013 00:20
Hi,
I have a problem using RefreshRecord. I have a calculated field inside my Stored Procedure which will not be updated with RefreshRecord. Here is a sample:
Stored Procedure:
SELECT Amount, Applied, Unapplied = ISNULL(Amount,0) - ISNULL(Applied,0)
FROM MyTable WITH (NOLOCK)
WHERE ...
I call Dataset.Refresh to bring data completely then if data is changed and user select a record and call Dataset.RefreshRecord, Unapplied column will not be updated.
What is the best solution for this?
I also tried to set the FullRefresh option before RefreshRecord but then RefreshRecord generates and error "Incorrect syntax near the keyword 'WHERE'."
Thanks
I have a problem using RefreshRecord. I have a calculated field inside my Stored Procedure which will not be updated with RefreshRecord. Here is a sample:
Stored Procedure:
SELECT Amount, Applied, Unapplied = ISNULL(Amount,0) - ISNULL(Applied,0)
FROM MyTable WITH (NOLOCK)
WHERE ...
I call Dataset.Refresh to bring data completely then if data is changed and user select a record and call Dataset.RefreshRecord, Unapplied column will not be updated.
What is the best solution for this?
I also tried to set the FullRefresh option before RefreshRecord but then RefreshRecord generates and error "Incorrect syntax near the keyword 'WHERE'."
Thanks