stored proc question

Results 1 to 2 of 2

Thread: stored proc question

  1. #1
    Domain Guest

    Default stored proc question

    I have a stored proc that updates or inserts 10 values. The first 5 get updated or insert on page1, then the next 5 get updated or insert on page2. Problem is that if I dont resend or change the first 5 values it puts them to NULL. How do I setthem up or avoid having to resend or change them?<BR>thansk

  2. #2
    Join Date
    Dec 1969

    Default RE: stored proc question

    You can submit an 11th parameter to the stored procedure to distinguish which page is making the call. Next, in the procedure declaration, set the default of all of them to null. Then in the procedure body have tow separate SQL UPDATE statements. One for the first five parameters, and the other for the next five. So in each statement, you&#039;re only updating five at a time. You distinguidh between the SQL commnads by using an IF block with the 11th parameter. Get it?<BR><BR>Note: make the "11th parameter" the first parameter in the declaration.

Posting Permissions

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