 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Source Finder Guest
|
Posted: Tue Jan 23, 2007 8:14 pm Post subject: SUBSTR don't work with parametized query under IBQuery compo |
|
|
Hi, i try to use the follow code:
' ......SUBSTR(:par, 4, 2) .......' when SUBSTR is one external function
defined on interbase but i get the follow error message when i try run this
SQL on IBQUERY component:
'Data Type unknow'. I define the "par" parameter correctly (string) on the
Parameter editor but the error persist.
The SUBSTR function work correctly in all cases, but in this case don't.
I solve this problem sending parameter formated from my application (using
Copy function), but i ask ..... Where are the error?
Why the code SUBSTR(:par, 4, 2) don't work?
Thank's |
|
| Back to top |
|
 |
Jeff Overcash (TeamB) Guest
|
Posted: Sun Jan 28, 2007 9:10 am Post subject: Re: SUBSTR don't work with parametized query under IBQuery c |
|
|
Source Finder wrote:
| Quote: | Hi, i try to use the follow code:
' ......SUBSTR(:par, 4, 2) .......' when SUBSTR is one external function
defined on interbase but i get the follow error message when i try run this
SQL on IBQUERY component:
'Data Type unknow'. I define the "par" parameter correctly (string) on the
Parameter editor but the error persist.
The SUBSTR function work correctly in all cases, but in this case don't.
I solve this problem sending parameter formated from my application (using
Copy function), but i ask ..... Where are the error?
Why the code SUBSTR(:par, 4, 2) don't work?
|
A lot of times this is because you have parameters in both the select portion
and the where portion of the SQL statement. InterBase parses this in a manner
that would require a different left to right top to bottom parse that TParam
has. The InterBase team has been made aware of this and that they should change
it to match other SQL engines, but to date they haven't. Try having parameters
in only one or the other section, not both.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts, build
a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act
alone, solve equations, analyze a new problem, pitch manure, program a computer,
cook a tasty meal, fight efficiently, die gallantly. Specialization is for
insects. (RAH) |
|
| 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
|
|