editing a stored procedure

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sat Jan 23 07:47:14 CST 2010


On 1/23/10 2:46 PM, "Bernard Devlin" <bdrunrev at gmail.com> wrote:

Hi Bernard,

Well, good points ...

> OK I worked this out.  The issue is that VStudio does not display the
> text of the changed procedure until the 'refresh' button is clicked.
> 
> There may well be good reasons for that, and I can live with it.
> Although it is such strange behaviour it needs to be signposted.  In
> Lotus Notes where data in a view might get changed in the background
> by someone else, the view of the data is marked as stale by the means
> of a 'refresh view' icon that appears in this situation.  Thus,
> instead of automatically updating the view, the user is left to choose
> when that update process happens BUT is also made aware that what they
> are viewing is a stale representation of the data in the database.
> There are arguments why such stale views should be preserved in e.g.
> the Data Browser of VStudio, but to display the stale state in the
> Schema Editor seems like a defect to me.
> 
> Furthermore, I do think that it is a bug that when one chooses to
> 'edit' from the context menu of a SP that one is taken to edit the old
> text if the 'refresh' button has not been clicked.  Opening up a SQL
> Editor on the text of a SP should display the current text of the SP
> not the old text.

Especially this one.
 
> Bernard
> 
> On Sat, Jan 23, 2010 at 10:39 AM, Bernard Devlin <bdrunrev at gmail.com> wrote:
> 
>> I have a stored procedure that is giving me a strange error message.
>> As far as I can tell, the SP had been working for some days, and I
>> don't believe I made any changes to the db schema that would bring
>> about these string link messages.
>> 
>> Rather than go into the error messages right now, I'd like to deal
>> with this issue of editing SPs.  Please consider these two scenarios:
>> 
>> 1) In VStudio I choose 'edit' from the context menu of the SP.  That
>> brings up the SQL Editor with the code for the SP displayed.  If I
>> make a change that complies with the Kernel's syntax and click
>> 'execute', the console displays the body of the re-edited SP followed
>> by "has been executed".  There are no error messages.
>> 
>> 2) If I do the same thing, but insert a syntactical error, and click
>> 'execute', then in the console I see something like this:
>> "Kernel error: 0x71000....unexpected token..."
>> 
>> All of this I understand, and it works as I would expect.
>> 
>> HOWEVER, in scenario 1) where everything has apparently worked, when I
>> close the SQL Editor and return to the Schema Editor, and look at the
>> code for the SP displayed there, it shows the changes have NOT taken
>> place.  This is not just an issue with the Schema Editor displaying
>> the old code; if I choose 'edit' from the SP in the Schema Editor,
>> when the SQL Editor opens it is showing the old SP code.
>> 
>> Is this a bug, or have I misunderstood the procesess whereby one edits
>> a SP in VStudio?  It seems to me that it is impossible to edit a SP
>> and save the changes.

I think this is extra optimization ...


To make it working as you xpect, it needs after

A) close of SQL editor

Or

B) may be ON SWITCH to Schema Editor

Refresh objects.

Problem is that this can be not super-fast for remote server,
And Vstudio as client currently don't know what was executed ...

We have ideas to improve RETURN back info after SqlExecute()
So Vstudio can be more smart to decide if it needs refresh objects and
which.

But this is yet on TODO.


-- 
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]




More information about the Valentina-studio mailing list