Last post Nov 20, 2014 10:15 AM by mroundabout
Nov 19, 2014 11:31 AM|mroundabout|LINK
I'm trying to edit my news pages:
Line 41: var updateCommand = "UPDATE NewsItems SET NewsTitle=@0 NewsText=@1 WHERE ID=@2";
Line 42: db.Execute(updateCommand, title, text, newskey);
Above you see NewsTitle and NewsText. If one or the other is removed editing in the remaining one can be carried out successfully. If the two are swapped around the error is with NewsTitle. There are no issues with adding or deleting items. There was a time
when all worked fine.
My knowledge if very limited and is mostly subjected to 'cut & paste'. Can anyone help, please?
Nov 19, 2014 11:47 AM|rrrsr7205|LINK
Separate the columns in the UPDATE command with commas.
var updateCommand = "UPDATE NewsItems SET NewsTitle=@0, NewsText=@1 WHERE ID=@2";
Nov 20, 2014 10:15 AM|mroundabout|LINK
I thought the solution would be a simple one but that it was so simple! Thank you, thank you, thank you.