 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
pcerdaz Guest
|
Posted: Wed Mar 01, 2006 5:03 pm Post subject: Oracle SQL params from IDE |
|
|
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. |
|
| Back to top |
|
 |
Leif Suonvieri Guest
|
Posted: Sun Mar 05, 2006 4:03 pm Post subject: Re: Oracle SQL params from IDE |
|
|
pcerdaz wrote:
| Quote: | 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.
|
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 |
|
| Back to top |
|
 |
pcerdaz Guest
|
Posted: Mon Mar 06, 2006 3:03 pm Post subject: Re: Oracle SQL params from IDE |
|
|
Leif Suonvieri <leif.s (AT) removethis (DOT) hem.utfors.se> wrote:
| Quote: | pcerdaz wrote:
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.
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
|
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 |
|
| Back to top |
|
 |
Leif Suonvieri Guest
|
Posted: Mon Mar 06, 2006 9:03 pm Post subject: Re: Oracle SQL params from IDE |
|
|
pcerdaz wrote:
| Quote: | Leif Suonvieri <leif.s (AT) removethis (DOT) hem.utfors.se> wrote:
pcerdaz wrote:
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.
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
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
|
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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|