Toad World® Forums

Errors when compiling stay


#1

If you compile a procedure (package/function) and you have an error, is shows up in the log at the bottom.

When you fix it and recompile, the error stays. If you compile again (ctrl-s) the errors will go away.

This makes for a lot of confusion.


#2

Hi Jet,

The Compile right click (in the code editor, or on DB Navigtor/DB Explorer) will only compile using the source from the dictionary, ie. not using the current text displayed in the code editor. The best way is to use the Save option (SQL Navigator will save the changes then do the compile) to get the object status updated.

Thanks,
Bruce


#3

Hi Bruce,

I didn’t explain properly.

I’m talking about the messages that appear in the “output” window. If you compile with an error, then fix the error and recompile, the error remains in the window. You don’t display this:

2:28:16 PM Start Compiling 1 object(s) …
2:28:16 PM Executing ALTER PROCEDURE trex_load_conf_pr1 COMPILE …
2:28:16 PM Compilation complete - no errors found
2:28:16 PM End Compiling 1 object(s)

Until I compile the second time.


#4

Hi Jet,

Thank you for your details.

Yes what you described is true in our product, but let me explain to you clearly:
In your situation, SQLNavigator detected that there were some changes in your procedure which haven’t been saved, so 1st time compiling(ctrl+s) = saving to make sure it’s in latest status as Bruce said, 2nd time compiling(ctrl+s) = compiling.
So in a word, it will do ‘save’ before compile once it detects any changes in the objects, if there isn’t any, it will just do compile at once.

Some users mentioned this before, and we admit it’s a little confusion. to avoid this, we have added a message in output said “procedure xxx is saved successfully” when you compile it for the first time. This message is applied to every kind of objects (trg/pro/func/pkg/type), and it will be avaliable in next beta build.

Hope this give help.

Thanks,
Shirly


#5

Hi Shirly,

Thanks for the explanation, but I’m pretty sure this is a change in behavior and not in a good way.

It doesn’t make any sense to continue to show the error messages when the errors aren’t there any more. If you’re saying it saves, but doesn’t compile then that really doesn’t make any sense.

When you do a ctrl-s, it should compile AND save like it has always done.


#6

Hi Joe,

I compared the behaviour of 6.7 and 7.0 and it appears almost the same, with 7.0 showing an additional message if the object was saved without errors. We never automatically clear the Output window and never did, so your claim that there is a change in behaviour isn’t valid.

Ctrl+S saves and compiles, like it always did.

Regards,
Roman


#7

Hi Roman,

Ok, I think I got a little confused. The box at the bottom of the code window disappears, but I didn’t think it did because the “red” messages stay in the output window. I think what may have changed is what displays in the output window.

Seems to me that in the past, when you compiled successfully, that was indicated in the output window. The second time you do a ctrl-S this is what happens. I think the problem is that you don’t do the same thing every time when ctrl-s is pressed. In one case you compile and get rid of the messages at the bottom of the code window. The second time you do it, then:
8:57:47 AM Start Compiling 1 object(s) …
8:57:47 AM Executing ALTER PROCEDURE trex_load_conf_pr1 COMPILE …
8:57:47 AM Compilation complete - no errors found
8:57:47 AM End Compiling 1 object(s)

appears in your output window.

The behavior is inconsistent and that’s what got me confused.