Page 1 of 1

Broken support of $ in sql since 9.1.3!?

Posted: Fri 29 Nov 2013 11:19
by a-s-z
Hi,

starting with 9.1.3 we have problems updating columns containing a dollar sign. We change the field value, but the field is missing in the update statement!

Problem seems to be located in parsing sql info, because the parser sees column name id$dollar as an expression and not as a field! When using a star instead of concrete names, it works as expected.

See changed code in CRParser.pas ll.759, it seems that handling of $ is missing!?

Code: Select all

create table odac_error_test
(
  id number,
  id$dollar number,
  text varchar2(50 char)
);
insert into odac_error_test values ( 1,1,'1234567890' );
Update failing for Dataset using query:

Code: Select all

select
  id$dollar
  ,id
from odac_error_test
use code like in a test application

Code: Select all

          with OraQuery1, FieldByName('ID$DOLLAR') do
          begin
            Value := 1 + Value;
            Post;
            if CachedUpdates then ApplyUpdates();
          end;
Best regards,
Andre

Re: Broken support of $ in sql since 9.1.3!?

Posted: Fri 29 Nov 2013 11:34
by AlexP
Hello,

We have already fixed this problem. This fix will be included in the new version

Re: Broken support of $ in sql since 9.1.3!?

Posted: Fri 29 Nov 2013 11:47
by a-s-z
Hi Alex,
AlexP wrote: We have already fixed this problem. This fix will be included in the new version
When you will release next version? Currently we are using 9.1.4

Since this bug may be responsible for other problems we have (Illegal parameter names, sequences with $), can you send me a code patch?

Best regards,
Andre

Re: Broken support of $ in sql since 9.1.3!?

Posted: Fri 29 Nov 2013 12:49
by AlexP
Hello,

We plan to release the new version next month. For the time being, to solve the problem, you should redefine the IsAlpha method in the TOraParser class in, as follows:

Code: Select all

  TOraParser = class (TSQLParser)
  ...
  protected
  ...
    function IsAlpha(Ch: char): boolean; override;

...

function TOraParser.IsAlpha(Ch: char): boolean;
begin
  case Ord(Ch) of
    Ord('a')..Ord('z'):
      Result := True;
    Ord('A')..Ord('Z'):
      Result := True;
    Ord('$'):
      Result := True;
    Ord('#'):
      Result := True;
    Ord(#128)..Ord(High(char)):
      Result := True;
    else
      Result := False;
  end;
end;