locked
Unable to Update / Delete rows in Listview using a Identity Column RRS feed

  • Question

  • I've created a website in wich I use a ListView to display the content of a table.
    In this tabel I have a Identity Column.
    This column is filled when I insert items into the table (using the ListView).
    I have several columns:
    Counter    (int -> identity)
    Name        (nchar(50))
    Comment  (nchar(50))
    Link           (nchar(80))

    I use the following update statement:
    UPDATE IndexTable SET Name = @Name, Comment = @Comment, Link = @Link WHERE (Counter = @Counter)

    And this delete statement:
    DELETE FROM IndexTable WHERE (Counter = @Counter)

    As I said before, I can insert items into the table using the insert button on the listview.
    When I use the edit+update or delete buttons nothing happens.

    Does anyone have the same problem or a sullotion to this problem?
    • Moved by Peter Ritchie Friday, September 5, 2008 2:56 PM question relating to ASP.net (Moved from Visual C# Language to Off-Topic Posts (Do Not Post Here))
    Friday, September 5, 2008 2:31 PM

Answers

  • For questions and discussions relating to ASP.NET applications and development, please see http://forums.asp.net/
    http://www.peterRitchie.com/blog
    • Marked as answer by Peter Ritchie Friday, September 5, 2008 2:55 PM
    Friday, September 5, 2008 2:55 PM