Toad World® Forums

Lower and Uppercase


#1

I think I found another bug… or at least it is an enhancement request

One of my functions has a parameter of a VARCHAR2-datatype. This parameter shows correctly in the Builder-window; it shows you it’s datatype as VARCHAR2(32767). However, when you change the datatype to varchar2 (notice the lowercase), it shows the datatype as varchar2; without the size.

The workaround is simple, just change the parameter datatype to uppercase…


#2

Alex,

Thanks. A question: you say “when you change the datatype to varchar2”

Where exactly are you making this change, and why?

Thanks! SF


#3

Hi SF (Steven?),

Thank you for your reply.
The change to the lowercase is in the sourcecode.
So instead of:
[pre]
function f (p_val in VARCHAR2)

[/pre]
I use this style (in lowercase):
[pre]
function f (p_val in varchar2)

[/pre]

If you opt to use the lowercase in the sourcecode, the datatype in the Builder does not show up as VARCHAR2(32767) but as varchar2.
When you create a testcase and want to run it, it gives a pop-up with warning concerning the datatype. The same is true for the return datatype. Choosing “ignore warnings when saving new tests” is one way but the generated testcode does not compile automagically.
Why would I want to change the sourcecode to uppercase? If I have to manually change the generated testcode each time I add a new testcase is well… kind of repetitive and boring.
I added a couple of screenshots, hopefully they show you what I mean.


#4

Hi SF (Steven?),

Thank you for your reply.
The change to the lowercase is in the sourcecode.
So instead of:
[pre]
function f (p_val in VARCHAR2)

[/pre]
I use this style (in lowercase):
[pre]
function f (p_val in varchar2)

[/pre]

If you opt to use the lowercase in the sourcecode, the datatype in the Builder does not show up as VARCHAR2(32767) but as varchar2.
When you create a testcase and want to run it, it gives a pop-up with warning concerning the datatype. The same is true for the return datatype. Choosing “ignore warnings when saving new tests” is one way but the generated testcode does not compile automagically.
Why would I want to change the sourcecode to uppercase? If I have to manually change the generated testcode each time I add a new testcase is well… kind of repetitive and boring.
I added a couple of screenshots, hopefully they show you what I mean.


#5

Alex,

You definintely should not have to change your source code. We should, of course, be handling this and it is in fact fixed for the next release. My apologies for your difficulties in the meantime.


#6

Yesterday while I was playing around with QCTO, I noticed something that the Upper- and Lowercase mix-up works the other way around with user-defined types.

What I did was the following:
[pre]
create or replace package pkg
is
type alx_tt is table of varchar2(30)
index by binary_integer;
procedure p1 (p_in in alx_tt);
procedure p2 (p_in in ALX_TT);
end;
/
[/pre]
(notice the upper- and lowercase of the datatype of the parameters)

When you want to create a test for this package, the data type for procedure p1 is “ALEX.pkg.alx_tt” and for procedure p2 it is “ALX_TT”.
The tests that you create for the second procedure will not compile correctly (as it cannot resolve the datatype.