--- ibx/trunk/design/IBSystemTables.pas 2014/07/07 13:00:15 20 +++ ibx/trunk/design/IBSystemTables.pas 2015/02/26 10:33:34 21 @@ -53,6 +53,7 @@ type UseOldValues: boolean = false); procedure GetProcParams(ProcName: string; ParamList: TStrings; InputParams: boolean); overload; function GetWord(S: string; WordNo: integer): string; + function RemoveSQLText(aMessage: string): string; public constructor Create; destructor Destroy; override; @@ -261,6 +262,16 @@ begin end; end; +function TIBSystemTables.RemoveSQLText(aMessage: string): string; +var idx: integer; +begin + idx := Pos(sSQLErrorSeparator,aMessage); + if idx > 0 then + Result := system.copy(aMessage,1,idx) + else + Result := aMessage; +end; + constructor TIBSystemTables.Create; begin FGetTableNames := TIBSQL.Create(nil); @@ -718,7 +729,7 @@ begin FTestSQL.Prepare; ShowMessage('SQL '+ GetSQLType(FTestSQL.SQLType) + ' Statement Looks OK'); except on E:EIBError do - ShowMessage(E.Message); + ShowMessage(RemoveSQLText(E.Message)); end; end;