Thread View: borland.public.cppbuilder.database.multi-tier
4 messages
4 total messages
Started by pcerdaz
Wed, 01 Mar 2006 15:05
Oracle SQL params from IDE
Author: pcerdaz
Date: Wed, 01 Mar 2006 15:05
Date: Wed, 01 Mar 2006 15:05
7 lines
1038 bytes
1038 bytes
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.
Re: Oracle SQL params from IDE
Author: Leif Suonvieri
Date: Sun, 05 Mar 2006 15:15
Date: Sun, 05 Mar 2006 15:15
13 lines
1429 bytes
1429 bytes
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
Re: Oracle SQL params from IDE
Author: pcerdaz
Date: Mon, 06 Mar 2006 13:08
Date: Mon, 06 Mar 2006 13:08
34 lines
2045 bytes
2045 bytes
Leif Suonvieri <leif.s@removethis.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
Re: Oracle SQL params from IDE
Author: Leif Suonvieri
Date: Mon, 06 Mar 2006 19:44
Date: Mon, 06 Mar 2006 19:44
46 lines
2848 bytes
2848 bytes
pcerdaz wrote: > Leif Suonvieri <leif.s@removethis.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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads