Stored proc with asp.net

Discussion in 'ASP .Net' started by Mark, Jan 9, 2004.

  1. Mark

    Mark Guest

    Hi
    I have a stored proc that inserts values into a db, now i
    want to give that stored proc a row Id for it to update.
    cant get it working though
    heres the code
    <code>
    ALTER PROCEDURE dbo.AddPay
    (
    @Pay VarChar(50)
    )
    AS
    Insert into TestFile
    (
    Pay
    )Values (
    @Pay
    where Id = @Id)
    </code>

    any ideas?
    thanks
    Mark
     
    Mark, Jan 9, 2004
    #1
    1. Advertising

  2. Mark

    Hans Kesting Guest

    see inline

    "Mark" <> wrote in message
    news:092501c3d6a1$38325fd0$...
    > Hi
    > I have a stored proc that inserts values into a db, now i
    > want to give that stored proc a row Id for it to update.
    > cant get it working though
    > heres the code
    > <code>
    > ALTER PROCEDURE dbo.AddPay
    > (
    > @Pay VarChar(50)
    > )
    > AS
    > Insert into TestFile


    to change a row you need an UPDATE command

    > (
    > Pay
    > )Values (
    > @Pay
    > where Id = @Id)


    this closing ) should be after the last value (before the "where")

    > </code>
    >
    > any ideas?
    > thanks
    > Mark
     
    Hans Kesting, Jan 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack Black
    Replies:
    3
    Views:
    2,804
    =?Utf-8?B?UGF1bA==?=
    Apr 20, 2005
  2. David Lozzi
    Replies:
    3
    Views:
    1,952
    David Lozzi
    Jun 1, 2005
  3. NevilleDNZ
    Replies:
    9
    Views:
    454
    NevilleDNZ
    Aug 16, 2006
  4. Rob

    Desparete for advice on stored proc from asp.net

    Rob, Jun 3, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    6
    Views:
    137
  5. Jean-Hugues ROBERT

    Why no Proc##[]=() ? Why no Proc##replace() ?

    Jean-Hugues ROBERT, May 1, 2004, in forum: Ruby
    Replies:
    14
    Views:
    303
    Jean-Hugues ROBERT
    May 5, 2004
Loading...

Share This Page