Icon View Incident Report

Minor Minor
Reported By: Mauro Botta
Reported On: 7/26/2013
For: Version 2.13 Build 3
# 3892 TEDBScript ConvertSQL Method Not Generating Correct SQL

I think there is an error in the procedure ConvertSQL of TEDBScript, in edb 2.08 work fine , don't work in EDB 2.13.

In EDB version 2.13 Build 3 TempStatment is not Quoted and so EDBScript.ExecScript doesn’t work…

procedure TEDBScript.ConvertSQL(TabSize: Integer=3);
var
  TempSourceSQL: TEDBString;
  TempPos: Integer;
  TempStatement: TEDBString;
begin
  FSQL.BeginUpdate;
  try
     TempSourceSQL:=FSQL.Text;
     with FSQL do
        begin
        Clear;
        Add('SCRIPT ()');
        Add('BEGIN');
        end;
     TempPos:=1;
     TempStatement:=NextSQLStatement(TempSourceSQL,TempPos);
     while (TempStatement <> '') do
        begin
        TempStatement:=TrimString(TempStatement);
        if (TempStatement <> '') then     
>>          FSQL.Add(Replicate(' ',TabSize)+TEDBString('EXECUTE IMMEDIATE ')+                     TempStatement  +TEDBString(';'));
        TempStatement:=NextSQLStatement(TempSourceSQL,TempPos);
        end;
     FSQL.Add('END');
  finally
     FSQL.EndUpdate;
  end;
end;

This is my correction:

FSQL.Add(Replicate(' ',TabSize)+TEDBString('EXECUTE IMMEDIATE ')+ QuotedStr( TempStatement ) +TEDBString(';'));



Comments Comments and Workarounds
This also affected the ElevateDB Manager.


Resolution Resolution
Fixed Problem on 7/27/2013 in version 2.14 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image