BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Oracle SQL params from IDE

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
pcerdaz
Guest





PostPosted: Wed Mar 01, 2006 5:03 pm    Post subject: Oracle SQL params from IDE Reply with 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.
Back to top
Leif Suonvieri
Guest





PostPosted: Sun Mar 05, 2006 4:03 pm    Post subject: Re: Oracle SQL params from IDE Reply with quote



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





PostPosted: Mon Mar 06, 2006 3:03 pm    Post subject: Re: Oracle SQL params from IDE Reply with quote



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





PostPosted: Mon Mar 06, 2006 9:03 pm    Post subject: Re: Oracle SQL params from IDE Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.