Gridview - how to delete row using stored procedure?

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Gridview - how to delete row using stored procedure?

    If I want to delete a row in a GridView control using a stored
    procedure, what do the DeleteParameters look like?

    Do I use an asp:ControlParameter?

    Do I use an asp:Parameter?

    I also thought perhaps trying to incorporate the GridView's
    DataKeyNames property somehow - so, when you click on a row to delete,
    it knows what the primary key is, and that would be the parameter to
    feed in to the stored procedure..?

    Thanks, regards, dnw.

    dotnw@hotmail.com Guest

  2. Similar Questions and Discussions

    1. Stored Procedure
      EXEC master..xp_cmdshell 'cscript c:\path\file.vbs' EXEC master..xp_cmdshell 'c:\path\file.exe' "Kannan" <gk_i@yahoo.com> wrote in message...
    2. stored procedure help
      Hi all! I am in need of writing a few stored procedures. The first one is to create a stored procedure to recover a database from backup and the...
    3. GridView paging/sorting - will it work with stored procedures?
      Can anyone tell me whether the new ASP.NET 2.0 GridView control supports sorting and paging when the data source is a SQL stored procedure, e.g....
    4. Stored procedure from stored procedure
      Is it possible to create a stored procedure from a stored procedure? When I attempt this inanity, it doesn't blow up until syntax error at the...
    5. Delete one stored procedure take 5 minutes
      Dear Larry, The platform is B50 with 1GM RAM running with DB2 UDB 7.2.7. It seems that not a special stored procedure; however, the prolonged...
  3. #2

    Default Re: Gridview - how to delete row using stored procedure?

    I got it, it's simple, it's just

    <DeleteParameters>

    <asp:Parameter Name="original_iIdent" Type="Int32" />


    </DeleteParameters>

    Where iIdent is the primary key col, for this example.

    dotnw@hotmail.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139