Header/Detail Stored Procedures

  • Dear Friends

    Warm Greetings

    I am into a QA Project.

    At present I am writing stored procedure for Header and Detail part seperately.

    I feel that there may be a better solution to write a single sp, with input parameters to process and insert/update/delete records with begin.. commit transaction.

    Return values can be fetched and message alerts can be fetched from Resource files.

    A better method can be suggested.

    I thank and appreciate your help in advance.

    Regards,

    Singaravel.A.P

    APS


    APS

  • Always better to make one trip instead of two if you can. You can handle it by supporting 'x' sets of detail parameters in your proc, or you can build up a XML doc, send that over as a param, then use OpenXML (SQL2K only) to rip it up and do the insert/update.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Thank you Mr.Andy Warren

    APS


    APS

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply