Article View: borland.public.cppbuilder.database.multi-tier
Article #120Re: Oracle SQL params from IDE
From: 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
Technical Details
Message-ID:
<440c9131$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4405c64b$1@newsgroups.borland.com> <440b0098$1@newsgroups.borland.com> <440c425e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: fcd2b,2207e430eb60e979 X-Google-Attributes: gidfcd2b,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 06 Mar 2006 20:44:41 +0100 From: Leif Suonvieri <leif.s@removethis.hem.utfors.se> User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: Re: Oracle SQL params from IDE References: <4405c64b$1@newsgroups.borland.com> <440b0098$1@newsgroups.borland.com> <440c425e$1@newsgroups.borland.com> In-Reply-To: <440c425e$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 84.218.35.103 Message-ID: <440c9131$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1141674289 84.218.35.103 (6 Mar 2006 11:44:49 -0700) Lines: 46 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail