DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Updating recordset returned from a SP

  1. #1
    rkbnair Guest

    Updating recordset returned from a SP


    I have a stored procedure where I select some records from a view. This record
    set is returned onto the VB code. So, Can I update this record set from VB
    by saying .recordset.update?

    I'm getting an error saying that 'This operation cannot be performed'

    Thanks
    RK.


  2. #2
    Jeannine Varunok Guest

    Re: Updating recordset returned from a SP


    At this point in time a view in SQL server can not be updated. May be some
    time in the future that functionality will be added to the SQL server engine.


    Wouldn't that be great if we could pull records from a view and make changes
    and then that change would update the data in the table from which the view
    is created.

    "rkbnair" <rkannale@solus1.oceaneering.com> wrote:
    >
    >I have a stored procedure where I select some records from a view. This

    record
    >set is returned onto the VB code. So, Can I update this record set from

    VB
    >by saying .recordset.update?
    >
    >I'm getting an error saying that 'This operation cannot be performed'
    >
    >Thanks
    >RK.
    >



  3. #3
    D. Patrick Hoerter Guest

    Re: Updating recordset returned from a SP

    Jeannine,

    >At this point in time a view in SQL server can not be updated.


    Huh? Yes, it can. The criteria is that only one table's data may be modified
    at one time, and there must be sufficient key data present to ensure a
    correct update. Try it yourself. Build a simple view, then update it.

    The problem with trying to update recordsets based on stored procedures
    comes from the fact that stored procedure output is intrinsically variable,
    possibly resulting from temporary tables, variables, cursors, etc., and for
    all intents and purposes, impossible to reverse-update.

    Regards,
    D. Patrick Hoerter

    Jeannine Varunok wrote in message <39528fae$1@news.devx.com>...
    >
    >At this point in time a view in SQL server can not be updated. May be some
    >time in the future that functionality will be added to the SQL server

    engine.
    >
    >
    >Wouldn't that be great if we could pull records from a view and make

    changes
    >and then that change would update the data in the table from which the view
    >is created.
    >
    >"rkbnair" <rkannale@solus1.oceaneering.com> wrote:
    >>
    >>I have a stored procedure where I select some records from a view. This

    >record
    >>set is returned onto the VB code. So, Can I update this record set from

    >VB
    >>by saying .recordset.update?
    >>
    >>I'm getting an error saying that 'This operation cannot be performed'
    >>
    >>Thanks
    >>RK.
    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center