Hi,
There is a bug/feature where with fixed char fields when using parameters, if the field is not padded to the field size, then the query does not return the expected result.
Is this a problem with :
a) Oracle in general
b) Delphi
c) The Core Lab driver
Is there some hidden setting that can help me or is there any advice?
I am writing an app for 3 databases Oracle/Informix/MS SQL so I am trying to go as generic as possible.
Thanks
Parameterised Queries not returning data
Ok, sorry one thing I forgot to mention is that this only happens when using a 'like' statement.
e.g.
product = 'a' //result correct
product like 'a%' //result correct
product like 'a' //result incorrect as nothing returned
Now this works fine on other databases just not Oracle. I am using a like to allow the users to do their own wild card searching and sometimes they won't put wild cards in which causes the issue. Obviously I can pad it but when working with a lot of different fields in many areas of the application this could become as issue if field sizes change at a later stage.
e.g.
product = 'a' //result correct
product like 'a%' //result correct
product like 'a' //result incorrect as nothing returned
Now this works fine on other databases just not Oracle. I am using a like to allow the users to do their own wild card searching and sometimes they won't put wild cards in which causes the issue. Obviously I can pad it but when working with a lot of different fields in many areas of the application this could become as issue if field sizes change at a later stage.