Oscar Picasso wrote :
>
>Hi,
>
>I have a DBPROC and want the client to be able to retrieves
>some messages
>(warnings, info...) about what happened during the execution
>of the procedure.
>
>The pseudo code would be something like:
>
>List messages = new List();
>if <condition-1> then
> messages.add('Message for condition one');
>if <condition-2> then
> messages.add('Message for condition two');
>if <condition-3> then
> messages.add('Message for condition three');
>...
>return messages;
>
>Obviously I don't know at design time how many messages will
>be returned.
>
>I don't see how to do that.
>
>I've thought about using a table to store the messages and
>returns a cursor to
>the newly inserted messages. I'm worried that this approach
>would impact
>negatively the performance.
>
>Furthermore, as the messages are only used during the
>procedure call, they
>shouldn't be permanently stored in a table.
>
>Any idea?
>
>
>
>_______________________________
>Do you Yahoo!?
>Declare Yourself - Register online to vote today!
>http://vote.yahoo.com
>
>--
>MaxDB Discussion Mailing List
>For list archives: http://lists.mysql.com/maxdb
>To unsubscribe:
>http://lists.mysql.com/maxdb?>[EMAIL PROTECTED]
>
Maybe you can use simply a CHAR output parameter which is long enough
to store the maximal length of a message :
CREATE BDPROC TEST (..., OUT MsgList CHAR(500)) AS
MsgList = ' ';
if <condition-1> then
MsgList = MsgList ||'Message for condition one;';
if <condition-2> then
MsgList = MsgList ||'Message for condition two;';
if <condition-3> then
MsgList = MsgList ||'Message for condition three;';
Best Regards,
Thomas
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]