From: Pavel C. <pc...@us...> - 2000-09-21 15:04:15
|
Update of /cvsroot/firebird/ibx/runtime In directory slayer.i.sourceforge.net:/tmp/cvs-serv15704/runtime Modified Files: IB.pas IBBlob.pas IBCustomDataSet.pas IBDataBase.pas IBDatabaseInfo.pas IBInstall.pas IBInstallHeader.pas IBSQL.pas IBSQLMonitor.pas IBServices.pas IBStoredProc.pas IBTable.pas IBUpdateSQL.pas IBUtils.pas IBXConst.pas Log Message: Update to version 4.3 Index: IB.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IB.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IB.pas 2000/08/03 20:17:05 1.1.1.1 --- IB.pas 2000/09/21 15:04:10 1.2 *************** *** 155,159 **** ibxeOutputParsingError, ibxeUseSpecificProcedures, ! ibxeSQLMonitorAlreadyPresent ); --- 155,177 ---- ibxeOutputParsingError, ibxeUseSpecificProcedures, ! ibxeSQLMonitorAlreadyPresent, ! ibxeCantPrintValue, ! ibxeEOFReached, ! ibxeEOFInComment, ! ibxeEOFInString, ! ibxeParamNameExpected, ! ibxeSuccess, ! ibxeDelphiException, ! ibxeNoOptionsSet, ! ibxeNoDestinationDirectory, ! ibxeNosourceDirectory, ! ibxeNoUninstallFile, ! ibxeOptionNeedsClient, ! ibxeOptionNeedsServer, ! ibxeInvalidOption, ! ibxeInvalidOnErrorResult, ! ibxeInvalidOnStatusResult, ! ibxeDPBConstantUnknownEx, ! ibxeTPBConstantUnknownEx ); *************** *** 268,272 **** SOutputParsingError, SUseSpecificProcedures, ! SSQLMonitorAlreadyPresent ); --- 286,308 ---- SOutputParsingError, SUseSpecificProcedures, ! SSQLMonitorAlreadyPresent, ! SCantPrintValue, ! SEOFReached, ! SEOFInComment, ! SEOFInString, ! SParamNameExpected, ! SSuccess, ! SDelphiException, ! SNoOptionsSet, ! SNoDestinationDirectory, ! SNosourceDirectory, ! SNoUninstallFile, ! SOptionNeedsClient, ! SOptionNeedsServer, ! SInvalidOption, ! SInvalidOnErrorResult, ! SInvalidOnStatusResult, ! SDPBConstantUnknownEx, ! STPBConstantUnknownEx ); Index: IBBlob.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBBlob.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBBlob.pas 2000/08/03 20:17:05 1.1.1.1 --- IBBlob.pas 2000/09/21 15:04:10 1.2 *************** *** 32,37 **** uses ! Windows, SysUtils, Classes, Forms, IBHeader, IBErrorCodes, IBExternals, ! DB, IB, IBDatabase, IBUtils; const --- 32,37 ---- uses ! SysUtils, Classes, IBHeader, IBErrorCodes, IBExternals, DB, IB, IBDatabase, IBUtils; ! const Index: IBCustomDataSet.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBCustomDataSet.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBCustomDataSet.pas 2000/08/03 20:17:07 1.1.1.1 --- IBCustomDataSet.pas 2000/09/21 15:04:10 1.2 *************** *** 240,248 **** function GetTransaction: TIBTransaction; function GetTRHandle: PISC_TR_HANDLE; ! procedure InternalDeleteRecord(Qry: TIBSQL; Buff: Pointer); function InternalLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; virtual; ! procedure InternalPostRecord(Qry: TIBSQL; Buff: Pointer); ! procedure InternalRevertRecord(RecordNumber: Integer); function IsVisible(Buffer: PChar): Boolean; procedure SaveOldBuffer(Buffer: PChar); --- 240,248 ---- function GetTransaction: TIBTransaction; function GetTRHandle: PISC_TR_HANDLE; ! procedure InternalDeleteRecord(Qry: TIBSQL; Buff: Pointer); virtual; function InternalLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; virtual; ! procedure InternalPostRecord(Qry: TIBSQL; Buff: Pointer); virtual; ! procedure InternalRevertRecord(RecordNumber: Integer); virtual; function IsVisible(Buffer: PChar): Boolean; procedure SaveOldBuffer(Buffer: PChar); *************** *** 270,274 **** procedure WriteRecordCache(RecordNumber: Integer; Buffer: PChar); function InternalGetRecord(Buffer: PChar; GetMode: TGetMode; ! DoCheck: Boolean): TGetResult; protected --- 270,274 ---- procedure WriteRecordCache(RecordNumber: Integer; Buffer: PChar); function InternalGetRecord(Buffer: PChar; GetMode: TGetMode; ! DoCheck: Boolean): TGetResult; virtual; protected *************** *** 279,289 **** procedure CheckDatasetOpen; function GetActiveBuf: PChar; ! procedure InternalBatchInput(InputObject: TIBBatchInput); ! procedure InternalBatchOutput(OutputObject: TIBBatchOutput); procedure InternalPrepare; virtual; procedure InternalUnPrepare; virtual; procedure InternalExecQuery; virtual; procedure InternalRefreshRow; virtual; ! procedure InternalSetParamsFromCursor; procedure CheckNotUniDirectional; --- 279,289 ---- procedure CheckDatasetOpen; function GetActiveBuf: PChar; ! procedure InternalBatchInput(InputObject: TIBBatchInput); virtual; ! procedure InternalBatchOutput(OutputObject: TIBBatchOutput); virtual; procedure InternalPrepare; virtual; procedure InternalUnPrepare; virtual; procedure InternalExecQuery; virtual; procedure InternalRefreshRow; virtual; ! procedure InternalSetParamsFromCursor; virtual; procedure CheckNotUniDirectional; *************** *** 328,332 **** procedure InternalDelete; override; procedure InternalFirst; override; ! function InternalGetFieldData(Field: TField; Buffer: Pointer): Boolean; procedure InternalGotoBookmark(Bookmark: Pointer); override; procedure InternalHandleException; override; --- 328,332 ---- procedure InternalDelete; override; procedure InternalFirst; override; ! function InternalGetFieldData(Field: TField; Buffer: Pointer): Boolean; virtual; procedure InternalGotoBookmark(Bookmark: Pointer); override; procedure InternalHandleException; override; *************** *** 337,341 **** procedure InternalPost; override; procedure InternalRefresh; override; ! procedure InternalSetFieldData(Field: TField; Buffer: Pointer); procedure InternalSetToRecord(Buffer: PChar); override; function IsCursorOpen: Boolean; override; --- 337,341 ---- procedure InternalPost; override; procedure InternalRefresh; override; ! procedure InternalSetFieldData(Field: TField; Buffer: Pointer); virtual; procedure InternalSetToRecord(Buffer: PChar); override; function IsCursorOpen: Boolean; override; *************** *** 2949,2953 **** Size := FieldSize; Precision := FieldPrecision; ! Required := False; InternalCalcField := False; if (FieldName <> '') and (RelationName <> '') then --- 2949,2953 ---- Size := FieldSize; Precision := FieldPrecision; ! Required := not FieldNullable; InternalCalcField := False; if (FieldName <> '') and (RelationName <> '') then *************** *** 3737,3741 **** lTempCurr : System.Currency; begin ! if Field.DataType = ftBCD then begin BCDToCurr(TBCD(Buffer^), lTempCurr); --- 3737,3741 ---- lTempCurr : System.Currency; begin ! if (Field.DataType = ftBCD) and (Buffer <> nil) then begin BCDToCurr(TBCD(Buffer^), lTempCurr); *************** *** 3766,3770 **** begin FRefreshSQL.Free; ! inherited destroy; end; --- 3766,3770 ---- begin FRefreshSQL.Free; ! inherited Destroy; end; *************** *** 3805,3808 **** --- 3805,3809 ---- IBError(ibxeNotEditing, [nil]); TIBCustomDataSet(FField.DataSet).RecordModified(True); + TBlobField(FField).Modified := true; result := FBlobStream.Write(Buffer, Count); TIBCustomDataSet(FField.DataSet).DataEvent(deFieldChange, Longint(FField)); Index: IBDataBase.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBDataBase.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** IBDataBase.pas 2000/09/04 12:10:34 1.2 --- IBDataBase.pas 2000/09/21 15:04:10 1.3 *************** *** 1936,1940 **** IBError(ibxeDPBConstantNotSupported, [DPBConstantNames[DPBVal]]) else ! IBError(ibxeDPBConstantUnknown, [sl.Names[i]]); end; end; --- 1936,1940 ---- IBError(ibxeDPBConstantNotSupported, [DPBConstantNames[DPBVal]]) else ! IBError(ibxeDPBConstantUnknownEx, [sl.Names[i]]); end; end; *************** *** 2005,2009 **** IBError(ibxeTPBConstantNotSupported, [TPBConstantNames[TPBVal]]) else ! IBError(ibxeTPBConstantUnknown, [TPBVal]); end; end; --- 2005,2009 ---- IBError(ibxeTPBConstantNotSupported, [TPBConstantNames[TPBVal]]) else ! IBError(ibxeTPBConstantUnknownEx, [sl.Names[i]]); end; end; Index: IBDatabaseInfo.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBDatabaseInfo.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBDatabaseInfo.pas 2000/08/03 20:17:09 1.1.1.1 --- IBDatabaseInfo.pas 2000/09/21 15:04:10 1.2 *************** *** 19,24 **** { express or implied. See the License for the specific language } { governing rights and limitations under the License. } - { The Original Code was created by InterBase Software Corporation } - { and its successors. } { Portions created by Inprise Corporation are Copyright (C) Inprise } { Corporation. All Rights Reserved. } --- 19,22 ---- *************** *** 32,37 **** uses ! Windows, SysUtils, Classes, Forms, ExtCtrls, ! IBHeader, IBExternals, IB, IBDatabase; type --- 30,34 ---- uses ! SysUtils, Classes, IBHeader, IBExternals, IB, IBDatabase; type *************** *** 81,85 **** function GetOperationCounts(DBInfoCommand: Integer; FOperation: TStringList): TStringList; function GetReadOnly: Long; - function GetLongDatabaseInfo(DatabaseInfoCommand: Integer): Long; function GetStringDatabaseInfo(DatabaseInfoCommand: Integer): String; function GetDBSQLDialect: Long; --- 78,81 ---- *************** *** 88,91 **** --- 84,88 ---- destructor Destroy; override; function Call(ErrCode: ISC_STATUS; RaiseError: Boolean): ISC_STATUS; + function GetLongDatabaseInfo(DatabaseInfoCommand: Integer): Long; property Allocation: Long read GetAllocation; property BaseLevel: Long read GetBaseLevel; Index: IBInstall.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBInstall.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBInstall.pas 2000/08/03 20:17:14 1.1.1.1 --- IBInstall.pas 2000/09/21 15:04:10 1.2 *************** *** 40,44 **** interface ! uses Windows, TypInfo,SysUtils, Classes, IB, IBInstallHeader, IBIntf, IBXConst; type --- 40,44 ---- interface ! uses TypInfo,SysUtils, Classes, IB, IBInstallHeader, IBIntf, IBXConst; type Index: IBInstallHeader.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBInstallHeader.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBInstallHeader.pas 2000/08/03 20:17:14 1.1.1.1 --- IBInstallHeader.pas 2000/09/21 15:04:10 1.2 *************** *** 41,46 **** interface - uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; - { InterBase Install API interface } type --- 41,44 ---- Index: IBSQL.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBSQL.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBSQL.pas 2000/08/03 20:17:16 1.1.1.1 --- IBSQL.pas 2000/09/21 15:04:10 1.2 *************** *** 425,429 **** function TIBXSQLVAR.AdjustScale(Value: Int64; Scale: Integer): Double; var ! Scaling, i: Integer; Val: Double; begin --- 425,430 ---- function TIBXSQLVAR.AdjustScale(Value: Int64; Scale: Integer): Double; var ! Scaling : Int64; ! i: Integer; Val: Double; begin *************** *** 448,452 **** function TIBXSQLVAR.AdjustScaleToInt64(Value: Int64; Scale: Integer): Int64; var ! Scaling, i: Integer; Val: Int64; begin --- 449,454 ---- function TIBXSQLVAR.AdjustScaleToInt64(Value: Int64; Scale: Integer): Int64; var ! Scaling : Int64; ! i: Integer; Val: Int64; begin *************** *** 464,471 **** function TIBXSQLVAR.AdjustScaleToCurrency(Value: Int64; Scale: Integer): Currency; var ! Scaling, i : Integer; FractionText, PadText, CurrText: string; begin ! result := Value; Scaling := 1; if Scale > 0 then --- 466,474 ---- function TIBXSQLVAR.AdjustScaleToCurrency(Value: Int64; Scale: Integer): Currency; var ! Scaling : Int64; ! i : Integer; FractionText, PadText, CurrText: string; begin ! Result := 0; Scaling := 1; if Scale > 0 then *************** *** 490,496 **** result := StrToCurr(CurrText); except ! on E: Exception do IBError(ibxeInvalidDataConversion, [nil]); end; ! end; end; --- 493,502 ---- result := StrToCurr(CurrText); except ! on E: Exception do ! IBError(ibxeInvalidDataConversion, [nil]); end; ! end ! else ! result := Value; end; *************** *** 1294,1311 **** if FParent.FNames[i] = FName then begin - xvar := FParent[i]; - xvar.FXSQLVAR^.sqlind^ := -1; - xvar.FModified := True; - end; - end else if ((not Value) and IsNullable) then - begin - for i := 0 to FParent.FCount - 1 do - if FParent.FNames[i] = FName then - begin xvar := FParent[i]; ! xvar.FXSQLVAR^.sqlind^ := 0; xvar.FModified := True; end; ! end; end; --- 1300,1321 ---- if FParent.FNames[i] = FName then begin xvar := FParent[i]; ! if Assigned(xvar.FXSQLVAR^.sqlind) then ! xvar.FXSQLVAR^.sqlind^ := -1; xvar.FModified := True; end; ! end ! else ! if ((not Value) and IsNullable) then ! begin ! for i := 0 to FParent.FCount - 1 do ! if FParent.FNames[i] = FName then ! begin ! xvar := FParent[i]; ! if Assigned(xvar.FXSQLVAR^.sqlind) then ! xvar.FXSQLVAR^.sqlind^ := 0; ! xvar.FModified := True; ! end; ! end; end; *************** *** 1443,1471 **** bUnique := True; NamesWereEmpty := (FNames.Count = 0); ! if FXSQLDA <> nil then begin ! for i := 0 to FCount - 1 do begin ! with FXSQLVARs[i].Data^ do begin if bUnique and (String(relname) <> '') then begin if FUniqueRelationName = '' then FUniqueRelationName := String(relname) ! else if String(relname) <> FUniqueRelationName then ! begin ! FUniqueRelationName := ''; ! bUnique := False; ! end; end; ! if NamesWereEmpty then begin st := String(aliasname); ! if st = '' then begin st := 'F_'; {do not localize} aliasname_length := 2; j := 1; j_len := 1; StrPCopy(aliasname, st + IntToStr(j)); ! end else begin StrPCopy(aliasname, st); j := 0; j_len := 0; end; ! while GetXSQLVARByName(String(aliasname)) <> nil do begin Inc(j); j_len := Length(IntToStr(j)); if j_len + aliasname_length > 31 then --- 1453,1490 ---- bUnique := True; NamesWereEmpty := (FNames.Count = 0); ! if FXSQLDA <> nil then ! begin ! for i := 0 to FCount - 1 do ! begin ! with FXSQLVARs[i].Data^ do ! begin if bUnique and (String(relname) <> '') then begin if FUniqueRelationName = '' then FUniqueRelationName := String(relname) ! else ! if String(relname) <> FUniqueRelationName then ! begin ! FUniqueRelationName := ''; ! bUnique := False; ! end; end; ! if NamesWereEmpty then ! begin st := String(aliasname); ! if st = '' then ! begin st := 'F_'; {do not localize} aliasname_length := 2; j := 1; j_len := 1; StrPCopy(aliasname, st + IntToStr(j)); ! end ! else ! begin StrPCopy(aliasname, st); j := 0; j_len := 0; end; ! while GetXSQLVARByName(String(aliasname)) <> nil do ! begin Inc(j); j_len := Length(IntToStr(j)); if j_len + aliasname_length > 31 then *************** *** 1533,1537 **** FXSQLVARs[i].FXSQLVAR := p; p := Pointer(PChar(p) + sizeof(FXSQLDA^.sqlvar)); - // FNames.Add(''); end; FSize := FCount; --- 1552,1555 ---- Index: IBSQLMonitor.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBSQLMonitor.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBSQLMonitor.pas 2000/08/03 20:17:16 1.1.1.1 --- IBSQLMonitor.pas 2000/09/21 15:04:10 1.2 *************** *** 311,315 **** inherited Create; FEventsCreated := false; ! FTraceFlags := [tfqPrepare .. tfMisc]; end; --- 311,316 ---- inherited Create; FEventsCreated := false; ! FTraceFlags := [tfQPrepare..tfMisc]; ! FEnabled := true; end; *************** *** 343,348 **** Sa.bInheritHandle := true; - FTraceFlags := [tfQPrepare..tfMisc]; - FEnabled := true; FSharedBuffer := CreateFileMapping($FFFFFFFF, @sa, PAGE_READWRITE, 0, cMonitorHookSize, PChar(MonitorHookNames[1])); --- 344,347 ---- *************** *** 773,781 **** Sleep(50); end; - { This little bit is to unlock the reader thread. bDone is normally true - at this point and therefor this will allow the reader thread to stop - waiting } - { WriteSQLData(' ', tfMisc); - WriteToBuffer; } end; --- 772,775 ---- Index: IBServices.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBServices.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBServices.pas 2000/08/03 20:17:18 1.1.1.1 --- IBServices.pas 2000/09/21 15:04:10 1.2 *************** *** 635,638 **** --- 635,639 ---- FLoginPrompt := True; FTraceFlags := []; + FOutputbuffer := nil; end; *************** *** 647,650 **** --- 648,652 ---- FParams.Free; end; + ReallocMem(FOutputBuffer, 0); inherited Destroy; end; *************** *** 1731,1735 **** FUserInfo[i].Free; FUserInfo := nil; ! inherited destroy; end; --- 1733,1737 ---- FUserInfo[i].Free; FUserInfo := nil; ! inherited Destroy; end; Index: IBStoredProc.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBStoredProc.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBStoredProc.pas 2000/08/03 20:17:18 1.1.1.1 --- IBStoredProc.pas 2000/09/21 15:04:10 1.2 *************** *** 31,37 **** interface ! uses Windows, SysUtils, Graphics, Classes, Controls, Db, StdVCL, IB, ! IBDatabase, IBCustomDataSet, IBHeader, IBSQL, IBUtils; ! { TIBStoredProc } type --- 31,37 ---- interface ! uses SysUtils, Classes, DB, IB, IBDatabase, IBCustomDataSet, ! IBHeader, IBSQL, IBUtils; ! { TIBStoredProc } type Index: IBTable.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBTable.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBTable.pas 2000/08/03 20:17:19 1.1.1.1 --- IBTable.pas 2000/09/21 15:04:10 1.2 *************** *** 31,37 **** interface ! uses Windows, SysUtils, Graphics, Classes, Controls, Db, StdVCL, ! IB, IBDatabase, IBCustomDataSet, IBHeader, IBSQL, IBUtils; ! type --- 31,37 ---- interface ! uses SysUtils, Classes, DB, IB, IBDatabase, IBCustomDataSet, ! IBHeader, IBSQL, IBUtils; ! type *************** *** 317,321 **** 'where R.RDB$RELATION_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, FTableName) + ''' ' + 'and R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME '+ {do not localize} --- 317,322 ---- 'where R.RDB$RELATION_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''' ' + 'and R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME '+ {do not localize} *************** *** 333,368 **** Name := TrimRight(Query.Current.ByName('RDB$FIELD_NAME').AsString); {do not localize} case Query.Current.ByName('RDB$FIELD_TYPE').AsInteger of {do not localize} ! blr_varying, blr_text: begin DataType := ftString; Size := Query.Current.ByName('RDB$FIELD_LENGTH').AsInteger; {do not localize} end; blr_float, blr_double, blr_d_float: DataType := ftFloat; ! blr_short: begin sqlscale := Query.Current.ByName('RDB$FIELD_SCALE').AsInteger; {do not localize} if (sqlscale = 0) then DataType := ftSmallInt ! else begin DataType := ftBCD; Precision := 4; end; end; ! blr_long: begin sqlscale := Query.Current.ByName('RDB$FIELD_SCALE').AsInteger; {do not localize} if (sqlscale = 0) then DataType := ftInteger ! else if (sqlscale >= (-4)) then begin DataType := ftBCD; Precision := 9; ! end else DataType := ftFloat; end; ! blr_int64: begin sqlscale := Query.Current.ByName('RDB$FIELD_SCALE').AsInteger; {do not localize} if (sqlscale = 0) then DataType := ftLargeInt ! else if (sqlscale >= (-4)) then begin DataType := ftBCD; Precision := 18; ! end else DataType := ftFloat; end; --- 334,378 ---- Name := TrimRight(Query.Current.ByName('RDB$FIELD_NAME').AsString); {do not localize} case Query.Current.ByName('RDB$FIELD_TYPE').AsInteger of {do not localize} ! blr_varying, blr_text: ! begin DataType := ftString; Size := Query.Current.ByName('RDB$FIELD_LENGTH').AsInteger; {do not localize} end; blr_float, blr_double, blr_d_float: DataType := ftFloat; ! blr_short: ! begin sqlscale := Query.Current.ByName('RDB$FIELD_SCALE').AsInteger; {do not localize} if (sqlscale = 0) then DataType := ftSmallInt ! else ! begin DataType := ftBCD; Precision := 4; end; end; ! blr_long: ! begin sqlscale := Query.Current.ByName('RDB$FIELD_SCALE').AsInteger; {do not localize} if (sqlscale = 0) then DataType := ftInteger ! else if (sqlscale >= (-4)) then ! begin DataType := ftBCD; Precision := 9; ! end ! else DataType := ftFloat; end; ! blr_int64: ! begin sqlscale := Query.Current.ByName('RDB$FIELD_SCALE').AsInteger; {do not localize} if (sqlscale = 0) then DataType := ftLargeInt ! else if (sqlscale >= (-4)) then ! begin DataType := ftBCD; Precision := 18; ! end ! else DataType := ftFloat; end; *************** *** 375,379 **** else DataType := ftBlob; ! blr_quad: begin DataType := ftUnknown; Size := sizeof (TISC_QUAD); --- 385,390 ---- else DataType := ftBlob; ! blr_quad: ! begin DataType := ftUnknown; Size := sizeof (TISC_QUAD); *************** *** 391,395 **** if ((not InternalCalcField) and Query.Current.ByName('RDB$DEFAULT_VALUE').IsNull and {do not localize} ! (Query.Current.ByName('RDB$NULL_FLAG').AsInteger = 1) )then begin {do not localize} Attributes := [faRequired]; Required := True; --- 402,407 ---- if ((not InternalCalcField) and Query.Current.ByName('RDB$DEFAULT_VALUE').IsNull and {do not localize} ! (Query.Current.ByName('RDB$NULL_FLAG').AsInteger = 1) )then {do not localize} ! begin Attributes := [faRequired]; Required := True; *************** *** 426,432 **** begin Query.SQL.Text := 'Alter Table ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' Add CONSTRAINT ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, Name) + ' Primary Key (' + {do not localize} FormatFieldsList(Fields) + --- 438,444 ---- begin Query.SQL.Text := 'Alter Table ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, FTableName) + ' Add CONSTRAINT ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, Name) + ' Primary Key (' + {do not localize} FormatFieldsList(Fields) + *************** *** 435,459 **** else if ([ixUnique, ixDescending] * Options = [ixUnique, ixDescending]) then Query.SQL.Text := 'Create unique Descending Index ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')' else if (ixUnique in Options) then Query.SQL.Text := 'Create unique Index ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')' else if (ixDescending in Options) then Query.SQL.Text := 'Create Descending Index ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')' else Query.SQL.Text := 'Create Index ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')'; Query.Prepare; --- 447,471 ---- else if ([ixUnique, ixDescending] * Options = [ixUnique, ixDescending]) then Query.SQL.Text := 'Create unique Descending Index ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')' else if (ixUnique in Options) then Query.SQL.Text := 'Create unique Index ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')' else if (ixDescending in Options) then Query.SQL.Text := 'Create Descending Index ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')' else Query.SQL.Text := 'Create Index ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, Name) + ' on ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList + ')'; Query.Prepare; *************** *** 476,480 **** Query.Transaction := Transaction; Query.SQL.Text := 'Drop index ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, Name); Query.Prepare; Query.ExecQuery; --- 488,492 ---- Query.Transaction := Transaction; Query.SQL.Text := 'Drop index ' + {do not localize} ! QuoteIdentifier(Database.SQLDialect, Name); Query.Prepare; Query.ExecQuery; *************** *** 495,503 **** 'where RDB$RELATION_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, FTableName) + ''' ' + ' AND RDB$CONSTRAINT_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, Name) + ''' ' + 'AND RDB$CONSTRAINT_TYPE = ''PRIMARY KEY'''; --- 507,517 ---- 'where RDB$RELATION_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''' ' + ' AND RDB$CONSTRAINT_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, Name)) + ''' ' + 'AND RDB$CONSTRAINT_TYPE = ''PRIMARY KEY'''; *************** *** 508,514 **** Query.Close; Query.SQL.Text := 'Alter Table ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' Drop Constraint ' + ! FormatIdentifier(Database.SQLDialect, Name); Query.Prepare; Query.ExecQuery; --- 522,528 ---- Query.Close; Query.SQL.Text := 'Alter Table ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' Drop Constraint ' + ! QuoteIdentifier(DataBase.SQLDialect, Name); Query.Prepare; Query.ExecQuery; *************** *** 530,538 **** 'where RDB$RELATION_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, FTableName) + ''' ' + 'AND RDB$INDEX_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, Name) + ''' ' + 'AND RDB$CONSTRAINT_TYPE = ''PRIMARY KEY'''; --- 544,554 ---- 'where RDB$RELATION_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''' ' + 'AND RDB$INDEX_NAME = ' + '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, Name)) + ''' ' + 'AND RDB$CONSTRAINT_TYPE = ''PRIMARY KEY'''; *************** *** 543,549 **** Query.Close; Query.SQL.Text := 'Alter Table ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' Drop Constraint ' + ! FormatIdentifier(Database.SQLDialect, Query.Current.ByName('RDB$CONSTRAINT_NAME').AsString); Query.Prepare; Query.ExecQuery; --- 559,565 ---- Query.Close; Query.SQL.Text := 'Alter Table ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' Drop Constraint ' + ! QuoteIdentifier(DataBase.SQLDialect, Query.Current.ByName('RDB$CONSTRAINT_NAME').AsString); Query.Prepare; Query.ExecQuery; *************** *** 647,651 **** 'RDB$INDEX_SEGMENTS S where I.RDB$INDEX_NAME = S.RDB$INDEX_NAME '+ {do not localize} 'and I.RDB$RELATION_NAME = ' + '''' + {do not localize} ! FormatIdentifierValue(Database.SQLDialect, FTableName) + ''''; Query.Prepare; Query.ExecQuery; --- 663,668 ---- 'RDB$INDEX_SEGMENTS S where I.RDB$INDEX_NAME = S.RDB$INDEX_NAME '+ {do not localize} 'and I.RDB$RELATION_NAME = ' + '''' + {do not localize} ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''''; Query.Prepare; Query.ExecQuery; *************** *** 671,675 **** 'Select RDB$FIELD_NAME from RDB$INDEX_SEGMENTS where RDB$INDEX_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, Name) + '''' + 'ORDER BY RDB$FIELD_POSITION'; {do not localize} SubQuery.Prepare; --- 688,693 ---- 'Select RDB$FIELD_NAME from RDB$INDEX_SEGMENTS where RDB$INDEX_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, Name)) + '''' + 'ORDER BY RDB$FIELD_POSITION'; {do not localize} SubQuery.Prepare; *************** *** 717,721 **** 'Select USER from RDB$RELATIONS where RDB$RELATION_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, FTableName) + ''''; Query.Prepare; Query.ExecQuery; --- 735,740 ---- 'Select USER from RDB$RELATIONS where RDB$RELATION_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''''; Query.Prepare; Query.ExecQuery; *************** *** 759,779 **** ftString: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' VARCHAR(' + IntToStr(Size) + ')'; {do not localize} ftFixedChar: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' CHAR(' + IntToStr(Size) + ')'; {do not localize} ftBoolean, ftSmallint, ftWord: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' SMALLINT'; {do not localize} ftInteger: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' INTEGER'; {do not localize} ftFloat, ftCurrency: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' DOUBLE PRECISION'; {do not localize} ftBCD: begin --- 778,798 ---- ftString: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' VARCHAR(' + IntToStr(Size) + ')'; {do not localize} ftFixedChar: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' CHAR(' + IntToStr(Size) + ')'; {do not localize} ftBoolean, ftSmallint, ftWord: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' SMALLINT'; {do not localize} ftInteger: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' INTEGER'; {do not localize} ftFloat, ftCurrency: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' DOUBLE PRECISION'; {do not localize} ftBCD: begin *************** *** 786,812 **** if (Precision <= 4 ) then FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' Numeric(18, 4)' {do not localize} else FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' Numeric(' + IntToStr(Precision) + ', 4)'; {do not localize} end; ftDate: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' DATE'; {do not localize} ftTime: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' TIME'; {do not localize} ftDateTime: if (Database.SQLDialect = 1) then FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' DATE' {do not localize} else FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' TIMESTAMP'; {do not localize} ftLargeInt: --- 805,831 ---- if (Precision <= 4 ) then FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' Numeric(18, 4)' {do not localize} else FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' Numeric(' + IntToStr(Precision) + ', 4)'; {do not localize} end; ftDate: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' DATE'; {do not localize} ftTime: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' TIME'; {do not localize} ftDateTime: if (Database.SQLDialect = 1) then FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' DATE' {do not localize} else FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' TIMESTAMP'; {do not localize} ftLargeInt: *************** *** 815,827 **** else FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' Numeric(18, 0)'; {do not localize} ftBlob, ftMemo: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' BLOB SUB_TYPE 1'; {do not localize} ftBytes, ftVarBytes, ftGraphic..ftTypedBinary: FieldList := FieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' BLOB SUB_TYPE 0'; {do not localize} ftUnknown, ftADT, ftArray, ftReference, ftDataSet, --- 834,846 ---- else FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' Numeric(18, 0)'; {do not localize} ftBlob, ftMemo: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' BLOB SUB_TYPE 1'; {do not localize} ftBytes, ftVarBytes, ftGraphic..ftTypedBinary: FieldList := FieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' BLOB SUB_TYPE 0'; {do not localize} ftUnknown, ftADT, ftArray, ftReference, ftDataSet, *************** *** 849,853 **** Query.transaction := Transaction; Query.SQL.Text := 'Create Table ' + ! FormatIdentifier(Database.SQLDialect, FTableName) + ' (' + FieldList; {do not localize} for I := 0 to IndexDefs.Count - 1 do --- 868,872 ---- Query.transaction := Transaction; Query.SQL.Text := 'Create Table ' + ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' (' + FieldList; {do not localize} for I := 0 to IndexDefs.Count - 1 do *************** *** 856,860 **** begin Query.SQL.Text := Query.SQL.Text + ', CONSTRAINT ' + ! FormatIdentifier(Database.SQLDialect, Name) + ' Primary Key (' + FormatFieldsList(Fields) + --- 875,879 ---- begin Query.SQL.Text := Query.SQL.Text + ', CONSTRAINT ' + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' Primary Key (' + FormatFieldsList(Fields) + *************** *** 896,900 **** Query.Transaction := Transaction; Query.SQL.Text := 'drop table ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName); Query.Prepare; Query.ExecQuery; --- 915,919 ---- Query.Transaction := Transaction; Query.SQL.Text := 'drop table ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName); Query.Prepare; Query.ExecQuery; *************** *** 915,919 **** Query.Transaction := Transaction; Query.SQL.Text := 'delete from ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName); Query.Prepare; Query.ExecQuery; --- 934,938 ---- Query.Transaction := Transaction; Query.SQL.Text := 'delete from ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName); Query.Prepare; Query.ExecQuery; *************** *** 959,963 **** 'from RDB$RELATIONS where RDB$RELATION_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, FTableName) + ''''; Query.Prepare; Query.ExecQuery; --- 978,983 ---- 'from RDB$RELATIONS where RDB$RELATION_NAME = ' + {do not localize} '''' + ! FormatIdentifierValue(Database.SQLDialect, ! QuoteIdentifier(DataBase.SQLDialect, FTableName)) + ''''; Query.Prepare; Query.ExecQuery; *************** *** 1049,1053 **** begin if Database.SQLDialect = 1 then begin ! Value := FormatIdentifier(Database.SQLDialect, Value); Result := StringReplace (Value, ';', ', ', [rfReplaceAll]); end --- 1069,1073 ---- begin if Database.SQLDialect = 1 then begin ! Value := QuoteIdentifier(Database.SQLDialect, Value); Result := StringReplace (Value, ';', ', ', [rfReplaceAll]); end *************** *** 1059,1065 **** FieldName := ExtractFieldName(Value, i); if Result = '' then ! Result := FormatIdentifier(Database.SQLDialect, FieldName) else ! Result := Result + ', ' + FormatIdentifier(Database.SQLDialect, FieldName); end; end; --- 1079,1085 ---- FieldName := ExtractFieldName(Value, i); if Result = '' then ! Result := QuoteIdentifier(Database.SQLDialect, FieldName) else ! Result := Result + ', ' + QuoteIdentifier(Database.SQLDialect, FieldName); end; end; *************** *** 1294,1300 **** SQL := TStringList.Create; SQL.Text := 'select ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + '.*, ' + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + FormatIdentifier(Database.SQLDialect, FTableName); if Filtered and (Filter <> '') then begin --- 1314,1320 ---- SQL := TStringList.Create; SQL.Text := 'select ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + '.*, ' {do not localize} + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + QuoteIdentifier(DataBase.SQLDialect, FTableName); if Filtered and (Filter <> '') then begin *************** *** 1316,1322 **** SQL.Text := SQL.Text + 'AND '; SQL.Text := SQL.Text + ! FormatIdentifier(Database.SQLDialect, FDetailFieldsList.Strings[i]) + ' = :' + ! FormatIdentifier(Database.SQLDialect, FMasterFieldsList.Strings[i]); end; end; --- 1336,1342 ---- SQL.Text := SQL.Text + 'AND '; SQL.Text := SQL.Text + ! QuoteIdentifier(DataBase.SQLDialect, FDetailFieldsList.Strings[i]) + ' = :' + ! QuoteIdentifier(DataBase.SQLDialect, FMasterFieldsList.Strings[i]); end; end; *************** *** 1325,1331 **** SelectSQL.Assign(SQL); RefreshSQL.Text := 'select ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + '.*, ' + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + FormatIdentifier(Database.SQLDialect, FTableName) + ' where RDB$DB_KEY = :IBX_INTERNAL_DBKEY'; {do not localize} WhereDBKeyRefreshSQL.Assign(RefreshSQL); --- 1345,1351 ---- SelectSQL.Assign(SQL); RefreshSQL.Text := 'select ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + '.*, ' {do not localize} + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' where RDB$DB_KEY = :IBX_INTERNAL_DBKEY'; {do not localize} WhereDBKeyRefreshSQL.Assign(RefreshSQL); *************** *** 1356,1370 **** end; InsertFieldList := InsertFieldList + ! FormatIdentifier(Database.SQLDialect, Name); InsertParamList := InsertParamList + ':' + ! FormatIdentifier(Database.SQLDialect, Name); UpdateFieldList := UpdateFieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' = :' + ! FormatIdentifier(Database.SQLDialect, Name); if (DataType <> ftBlob) and (DataType <>ftMemo) then WhereAllFieldList := WhereAllFieldList + ! FormatIdentifier(Database.SQLDialect, Name) + ' = :' + ! FormatIdentifier(Database.SQLDialect, Name);{do not localize} end; end; --- 1376,1390 ---- end; InsertFieldList := InsertFieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name); InsertParamList := InsertParamList + ':' + ! QuoteIdentifier(DataBase.SQLDialect, Name); UpdateFieldList := UpdateFieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' = :' + ! QuoteIdentifier(DataBase.SQLDialect, Name); if (DataType <> ftBlob) and (DataType <>ftMemo) then WhereAllFieldList := WhereAllFieldList + ! QuoteIdentifier(DataBase.SQLDialect, Name) + ' = :' + ! QuoteIdentifier(DataBase.SQLDialect, Name);{do not localize} end; end; *************** *** 1382,1387 **** tmp := ExtractFieldName(FPrimaryIndexFields, i); tmp := ! FormatIdentifier(Database.SQLDialect, tmp) + ' = :' + ! FormatIdentifier(Database.SQLDialect, tmp);{do not localize} if WherePrimaryFieldList <> '' then WherePrimaryFieldList := --- 1402,1407 ---- tmp := ExtractFieldName(FPrimaryIndexFields, i); tmp := ! QuoteIdentifier(DataBase.SQLDialect, tmp) + ' = :' + ! QuoteIdentifier(DataBase.SQLDialect, tmp);{do not localize} if WherePrimaryFieldList <> '' then WherePrimaryFieldList := *************** *** 1398,1416 **** begin DeleteSQL.Text := 'delete from ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' where RDB$DB_KEY = ' + ':IBX_INTERNAL_DBKEY'; {do not localize} GenerateFieldLists; InsertSQL.Text := 'insert into ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + ' (' + InsertFieldList + {do not localize} ') values (' + InsertParamList + ')'; {do not localize} ModifySQL.Text := 'update ' + ! FormatIdentifier(Database.SQLDialect, FTableName) + ' set ' + UpdateFieldList + {do not localize} ' where RDB$DB_KEY = :IBX_INTERNAL_DBKEY'; {do not localize} WhereAllRefreshSQL.Text := 'select ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + '.*, ' + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + FormatIdentifier(Database.SQLDialect, FTableName) + ' where ' + WhereAllFieldList; {do not localize} if FPrimaryIndexFields <> '' then --- 1418,1436 ---- begin DeleteSQL.Text := 'delete from ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' where RDB$DB_KEY = ' + ':IBX_INTERNAL_DBKEY'; {do not localize} GenerateFieldLists; InsertSQL.Text := 'insert into ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' (' + InsertFieldList + {do not localize} ') values (' + InsertParamList + ')'; {do not localize} ModifySQL.Text := 'update ' + ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' set ' + UpdateFieldList + {do not localize} ' where RDB$DB_KEY = :IBX_INTERNAL_DBKEY'; {do not localize} WhereAllRefreshSQL.Text := 'select ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + '.*, ' + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' where ' + WhereAllFieldList; {do not localize} if FPrimaryIndexFields <> '' then *************** *** 1418,1424 **** GenerateWherePrimaryFieldList; WherePrimaryRefreshSQL.Text := 'select ' + {do not localize} ! FormatIdentifier(Database.SQLDialect, FTableName) + '.*, ' {do not localize} + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + FormatIdentifier(Database.SQLDialect, FTableName) + ' where ' + WherePrimaryFieldList; {do not localize} end; --- 1438,1444 ---- GenerateWherePrimaryFieldList; WherePrimaryRefreshSQL.Text := 'select ' + {do not localize} ! QuoteIdentifier(DataBase.SQLDialect, FTableName) + '.*, ' {do not localize} + 'RDB$DB_KEY as IBX_INTERNAL_DBKEY from ' {do not localize} ! + QuoteIdentifier(DataBase.SQLDialect, FTableName) + ' where ' + WherePrimaryFieldList; {do not localize} end; Index: IBUpdateSQL.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBUpdateSQL.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBUpdateSQL.pas 2000/08/03 20:17:19 1.1.1.1 --- IBUpdateSQL.pas 2000/09/21 15:04:10 1.2 *************** *** 31,36 **** interface ! uses Windows, SysUtils, Graphics, Classes, Controls, Db, StdVCL, ! IB, IBCustomDataSet, IBQuery; type --- 31,35 ---- interface ! uses SysUtils, Classes, DB, IB, IBCustomDataSet, IBQuery; type Index: IBUtils.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBUtils.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBUtils.pas 2000/08/03 20:17:19 1.1.1.1 --- IBUtils.pas 2000/09/21 15:04:10 1.2 *************** *** 147,153 **** function QuoteIdentifier(Dialect: Integer; Value: String): String; begin - Value := Trim(Value); if Dialect = 1 then ! Value := AnsiUpperCase(Value) else Value := '"' + Value + '"'; --- 147,152 ---- function QuoteIdentifier(Dialect: Integer; Value: String): String; begin if Dialect = 1 then ! Value := AnsiUpperCase(Trim(Value)) else Value := '"' + Value + '"'; Index: IBXConst.pas =================================================================== RCS file: /cvsroot/firebird/ibx/runtime/IBXConst.pas,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** IBXConst.pas 2000/08/03 20:17:19 1.1.1.1 --- IBXConst.pas 2000/09/21 15:04:10 1.2 *************** *** 166,172 **** SInvalidOnStatusResult = 'Unexpected onStatus return value'; ! SInterbaseExpressVersion = 'InterbaseExpress 4.2'; SEditSQL = 'Edit SQL'; ! implementation --- 166,174 ---- SInvalidOnStatusResult = 'Unexpected onStatus return value'; ! SInterbaseExpressVersion = 'InterbaseExpress 4.3'; SEditSQL = 'Edit SQL'; ! SDPBConstantUnknownEx = 'DPB Constant (%s) is unknown'; ! STPBConstantUnknownEx = 'TPB Constant (%s) is unknown'; ! implementation |