June 11th, 2004, 10:46 AM
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
June 11th, 2004, 09:25 PM
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