Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread EDB 2.13 - Missing Quoted in TEDBScript.ConvertSQL
Fri, Jul 26 2013 6:52 AMPermanent Link

Mauro Botta

Hi,

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

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;

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

This is my correction:

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




May you post here your official fix , here, please  ?

i need this fix for work.
Mon, Jul 29 2013 12:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mauro,

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

Thanks, I'll make sure that this is fixed.

<< May you post here your official fix , here, please  ? >>

Your fix will work fine.

Tim Young
Elevate Software
www.elevatesoft.com


Image