Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Oracle SQL params from IDE

2 views
Skip to first unread message

pcerdaz

unread,
Mar 1, 2006, 10:05:31 AM3/1/06
to

Hy all, I'm working on a SQL from C++Builder BDS2006 with next
syntax problem: the IDE use ":" before the name of parameter
but Oracle does not accept this character. The Oracle
accept "&" character but IDE don't understand it.
How can I solve this problem?
Thanks in advance.

Leif Suonvieri

unread,
Mar 5, 2006, 10:15:29 AM3/5/06
to

I don't think I understand your problem.
The colon in Borland will only be used locally to substitute the named
parameter for its value, before it is sent to Oracle, so Oracle won't
see it at all.
/Leif

pcerdaz

unread,
Mar 6, 2006, 8:08:30 AM3/6/06
to

Thank you and sorry if I'm wrong, but I supose that my problem
is the colon v/s "&" in Oracle. When I try to activate the
following query an exception error is shown: "Operation not
applicable", but if I change the ":Nombre" parameter by a
value the query works well.

SELECT ID, PREFIX, STREET_NAME, SUFIX, CITY, INIIZQ
FROM VIAL_STGO Vial_stgo
WHERE (STREET_NAME LIKE :Nombre)
AND (SUFIX = 'LAS CONDES')
AND (PREFIX = 'CALLE')
ORDER BY INIIZQ

Moreover, when I test this query over Oracle it works well
(but using "&" to declare the parameter).

Regards,
PCSdeZ

Leif Suonvieri

unread,
Mar 6, 2006, 2:44:41 PM3/6/06
to

OK, are you testing the query in runtime or design time?
In both cases you must supply a value for the parameter first,
have you done that?
The SQL syntax "...STREET_NAME LIKE..." implies that the parameter shall
be of string type, have you specified that?
If the parameter type is unknown and you set the parameter to a numeric
value, I guess you will end up with an error.

I usually find it easiest to set parameter values in designtime and also
execute the query in designtime until it passes without any errors.

Regards, Leif S

0 new messages