VS eats my SP

Barry G. Sumpter BarrySum at BigPond.Net.AU
Sun Oct 7 04:52:23 CDT 2007


Hi Ruslan,

Thanks for the reply and continued assistance.

Please don't let the logic distract you from the subject.

Too many copy n pastes on my part, saving the text to note pad, and trying
to get the right combination of procedural steps to get this to work and
reproduce the error.

It's been a very slow and frustrating go at SPs.


I'm certainly learning heaps over the last few weeks, including this reply,
with all the SP question and answers.


Looking forward to moving to 3.5 when it's ready.

baz


 


-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ruslan Zasukhin
Sent: Sunday, 7 October 2007 4:00 PM
To: BarrySum at BigPond.Net.AU; Ivan Smahin; valentina at lists.macserve.net
Subject: Re: VS eats my SP

On 7/10/07 12:04 AM, "Barry G. Sumpter" <BarrySum at BigPond.Net.AU> wrote:

> This is how to reproduce the error
> 
> Execute this in a sql tab
> 
> 
> CREATE OR REPLACE PROCEDURE xxx( IN inValue long, Out outValue Long )
> BEGIN
>       IF inValue > 0 THEN
>            inValue = CEIL(inValue);
>       END IF
>  END
>  
>  
> 
> 
> Then
> Execute this in another sql tab
> 
> 
>  set @inValue = 1.59;
>  call xxx( @inValue, @outValue );
>  select @outValue;
> 
> the results are returned properly
> 
> in the 'number of records: 1'  result - click on the white space
> - and I get an error or VS freezes
> 
> I return to VS and stored procedures are not there.
> 
> Other times I create the stored procedure
>   - flush DB or restart VS or restart Winxp
>     - SP is still there
>        - then Execute the 2nd qry and same thing happens - error or freeze
>             - then return to VS and the SP is gone
> 
>  
> Hth

Ivan, please check this issue. Report into Mantis also.

> I'll have to drop my Valentina SP research for now
> as I need to move on to other more progressive assignments.

Btw, Barry,

1) in fact your procedure has mistake I think, must be as

CREATE OR REPLACE PROCEDURE xxx( IN inValue long, Out outValue Long )
BEGIN
       IF inValue > 0 THEN
            outValue = CEIL(inValue)
       ELSE
            outValue = inValue
       END IF
END


2) this PROCEDURE in fact is good candidate to be FUNCTION

CREATE OR REPLACE FUNCTION xxx( IN inValue long )
RETURNS LONG
BEGIN
       IF inValue > 0 THEN
            return CEIL(inValue)
       ELSE
            return inValue
       END IF
END


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]


_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list