Subject | Re[4]: [Firebird-Architect] RFC: Please unify stored procedure execution |
---|---|
Author | Dmitry Kuzmenko |
Post date | 2004-12-21T11:54:04Z |
Hello, Martijn!
Tuesday, December 21, 2004, 1:48:58 PM, you wrote:
MT> No, you're wrong. Let me tell you why...
MT> In IB/Fb, there is only 1 type of call to a procedure. But, in Java speak,
MT> when you "call" a procedure, it can be a procedure on any database engine.
MT> Next, this procedure can return output parameters OR it can return a
MT> resultset. (eg: a MS SQL procedure). So, Java has a facility to return a
MT> resultset from a stored procedure call.
I don't care about what MS SQL can. Interbase or Firebird CAN NOT return a
resultset from EXECUTE PROCEDURE. Why not to extend this, instead of
making other strange things?
For example, IBX (Interbase Express) components have IBStoredProc
component. It also only can EXECUTE given procedure. But, IBStoredProc
inhetited from DataSet. And "but" again, it still can't get resultset
from selectable stored procedure. I don't know why it was done, maybe
Jeff wanted to extend IBStoredProc functionality, but now it is
useless as dataset. And the only suggestion to get resultset from
procedure is to use IBQuery, IBSQL or IBDataSet with query
'SELECT* FROM SP'.
I'm strict? Maybe.
MT> To convert this generic Java-calling mechanism to Firebird, you should use
MT> either EXEC or SELECT (when you want to return a resultset). The problem
it is hack, really, to use select instead of exec. Isn't it? It's
driver decision. I know that here is hard to understand what
exact procedure was designed for - to be executed or selected, but...
--
Dmitri Kouzmenko
Tuesday, December 21, 2004, 1:48:58 PM, you wrote:
MT> No, you're wrong. Let me tell you why...
MT> In IB/Fb, there is only 1 type of call to a procedure. But, in Java speak,
MT> when you "call" a procedure, it can be a procedure on any database engine.
MT> Next, this procedure can return output parameters OR it can return a
MT> resultset. (eg: a MS SQL procedure). So, Java has a facility to return a
MT> resultset from a stored procedure call.
I don't care about what MS SQL can. Interbase or Firebird CAN NOT return a
resultset from EXECUTE PROCEDURE. Why not to extend this, instead of
making other strange things?
For example, IBX (Interbase Express) components have IBStoredProc
component. It also only can EXECUTE given procedure. But, IBStoredProc
inhetited from DataSet. And "but" again, it still can't get resultset
from selectable stored procedure. I don't know why it was done, maybe
Jeff wanted to extend IBStoredProc functionality, but now it is
useless as dataset. And the only suggestion to get resultset from
procedure is to use IBQuery, IBSQL or IBDataSet with query
'SELECT* FROM SP'.
I'm strict? Maybe.
MT> To convert this generic Java-calling mechanism to Firebird, you should use
MT> either EXEC or SELECT (when you want to return a resultset). The problem
it is hack, really, to use select instead of exec. Isn't it? It's
driver decision. I know that here is hard to understand what
exact procedure was designed for - to be executed or selected, but...
--
Dmitri Kouzmenko