ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bing Qiao <qiaob...@gmail.com>
Subject Re: Get return value of stored procedure
Date Thu, 23 Jun 2005 16:23:54 GMT
Thanks for your reply.

First, I was referring to sqlmap, not ibatis dao. Are these two
exlusive, jdbc and sqlmap?

Second, I happen to have known that sqlmap supports OUT parameters.

As a java developer I have no problem in using OUT parameters.

What I was asking is: (1) does sqlmap directly support retrieving
RETURN code that is defined as follows in SQL online book.

Exits unconditionally from a query or procedure. RETURN is immediate
and complete and can be used at any point to exit from a procedure,
batch, or statement block. Statements following RETURN are not

Obviously, we can catch raiserror (defined as follows from SQL online
book) exceptions, but what about the severity level and state? My
second question: (2)can we retrieve them as well?

Returns a user-defined error message and sets a system flag to record
that an error has occurred. Using RAISERROR, the client can either
retrieve an entry from the sysmessages table or build a message
dynamically with user-specified severity and state information. After
the message is defined it is sent back to the client as a server error

I undertand they might be vendor specific, so if no support for them
can someone please clarify that? really appreciate your help, thanks a

On 6/23/05, Larry Meadors <larry.meadors@gmail.com> wrote:
> On 6/23/05, Bing Qiao <qiaobing@gmail.com> wrote:
> > Help please!
> >
> > I have had several talks with our DBA who is so skeptical of iBATIS
> > and vow to force us to go back to jdbc. One of his arguments is that
> > the return code from stored procedure can not be retrieved by sqlmap.
> First: That is just plain silly. There is NOTHING in iBATIS that
> precludes you from using JDBC, so your first point is that the two are
> NOT exclusive.
> Second: You can get return values from stored procedures. Why else
> would we have any support for them? Some return values (i.e., Oracle
> REFCURSOR return values) are not supported without some additional
> work, but mapping simpler return values is trivial. Support is
> available for in, out, and inout parameters.
> http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+call+a+stored+procedure%3F
> Please do yourself a favor, and read the sql maps docs, there is a ton
> of good info there.
> Larry
> >
> > I tried all I could but no luck till now. Any help please!
> >
> > Thanks a lot!
> >
> > On 6/23/05, Bing Qiao <qiaobing@gmail.com> wrote:
> > > Hi,
> > >
> > > What do I need to add to the sqlmap to get the return value (for
> > > example, return -9) of stored procedure?
> > >
> > >
> > > Thanks very much!
> > >
> > > bqiao
> > >
> >

View raw message