1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Rep Power

    TStoredProcs: .Open or Execute

    I am currently using TOraStoredProc components for returning cursors to the client. Should I be using either open or Execute for the operation or does it matter which one I use.
    Are ther any penalities for using one or the other
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    Rules of thumb:
    1. If the stored procedure merely updates/inserts/deletes tables, but does not return rows, use Execute (though I think Open would also work)
    2. If the stored procedure returns a result set, always use Open. You cannot use Execute and expect to iterate through the result set.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo