Page 1 of 1

TMSScript & division sign

Posted: Wed 26 Jun 2013 07:38
by Saupg
Hello!

I found strange bug - i can't use division sign ('/') if it is only one at line.
I get "syntax error".
Simple example:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var
  MSConnection: TMSConnection;
  MSScript: TMSScript;
begin
  MSConnection := TMSConnection.Create(Self);
  MSScript := TMSScript.Create(Self);
  try
    MSConnection.Authentication := auWindows;
    MSConnection.Server := 'db01';
    MSConnection.Database := 'master';
    MSConnection.LoginPrompt := False;

    MSScript.Connection := MSConnection;
    MSScript.SQL.Text := 'SELECT'#10#13 +
      '(10'#10#13 +
      '/'#10#13 +     // This line with error!
      '2) AS RES';
    MSScript.Execute;
  finally
    MSScript.Free;
    MSConnection.Free;
  end;
end;
p.s.> I try to migrate from SDAC 5 to SDAC 6 Trial before buy it. Please help.

Re: TMSScript & division sign

Posted: Wed 26 Jun 2013 10:23
by AndreyZ
Hello,

Thank you for the information. We have reproduced the problem and investigation of the problem is in progress. As soon as we have any results we will let you know.

Re: TMSScript & division sign

Posted: Thu 11 Jul 2013 06:43
by AndreyZ
We have investigated this problem. The point is that when there is only the '/' character in the line, it is considered as a delimiter. To avoid the problem, you should not leave the '/' character alone in the line. Here is en example:

Code: Select all

MSScript.SQL.Text := 'SELECT (10 / 2) AS RES';
MSScript.Execute;

Re: TMSScript & division sign

Posted: Fri 12 Jul 2013 05:24
by Saupg
AndreyZ, thanks for reply.

I'm using SDAC 5 now and my project has many sql queries with single '/' in one line. It works!
"10" and "2" values from my example are big sub-queries in my project and single '/' symbol in one line used for readability.

Re: TMSScript & division sign

Posted: Fri 12 Jul 2013 07:29
by AndreyZ
Please specify the exact version of SDAC 5 you are using now (for example, 5.10.0.7). You can learn it from the About sheet of TMSConnection Editor.