Hi,
I have a datalist where the user is shown a link for every 5 rows in the datalist. When the user clicks on the link after the first 5 rows, then these 5 rows have to be updated (just want to set one column to 'off').
When i use the following (quite simple) SQL it works through the SQL firehose - the 5 rows get's updated like it's supposed to. But when i create a datalist to update the rows and insert it on a page all rows gets updated.
The SQL is:
UPDATE TOP (5) SalgTest
SET SalgTest_AllowDelete = 'off'
WHERE SalgTest_UserID = '@Session("DW_extranet_AccessUserID")'
AND SalgTest_AllowDelete = 'on'
I've also tried the following, but that doesn't work either:
UPDATE SalgTest
SET SalgTest_AllowDelete = 'off'
WHERE SalgTestID IN (
SELET TOP 5 SalgTestID
FROM SalgTest
WHERE SalgTest_UserID = '@Session("DW_extranet_AccessUserID")'
AND SalgTest_AllowDelete = 'on'
)
Why does this not work through the datalist module? Or even better - can anyone of you find another way to accomplish this?
Thanks in advance