ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBDatabase.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBDatabase.pas (file contents):
Revision 7 by tony, Sun Aug 5 18:28:19 2012 UTC vs.
Revision 13 by tony, Thu Nov 22 22:53:40 2012 UTC

# Line 215 | Line 215 | type
215      procedure Notification( AComponent: TComponent; Operation: TOperation); override;
216      function GetDataset(Index : longint) : TDataset; override;
217      function GetDataSetCount : Longint; override;
218 +    procedure ReadState(Reader: TReader); override;
219      procedure SetConnected (Value : boolean); override;
220    public
221      constructor Create(AOwner: TComponent); override;
# Line 420 | Line 421 | procedure GenerateTPB(sl: TStrings; var
421  
422   implementation
423  
424 < uses IBIntf, IBSQLMonitor, IBCustomDataSet, IBDatabaseInfo, IBSQL, IBUtils, typInfo;
424 > uses IBIntf, IBSQLMonitor, IBCustomDataSet, IBDatabaseInfo, IBSQL, IBUtils,
425 >     typInfo;
426  
427   { TIBDatabase }
428  
429   constructor TIBDatabase.Create(AOwner: TComponent);
430 + {$ifdef WINDOWS}
431 + var acp: uint;
432 + {$endif}
433   begin
434    inherited Create(AOwner);
435    FIBLoaded := False;
# Line 435 | Line 440 | begin
440    FTransactions := TList.Create;
441    FDBName := '';
442    FDBParams := TStringList.Create;
443 +  {$ifdef UNIX}
444 +  if csDesigning in ComponentState then
445 +    FDBParams.Add('lc_ctype=UTF-8');
446 +  {$else}
447 +  {$ifdef WINDOWS}
448 +  if csDesigning in ComponentState then
449 +  begin
450 +    acp := GetACP;
451 +    if (acp >= 1250) and (acp <= 1254) then
452 +      FDBParams.Values['lc_ctype'] := Format('WIN%d',[acp]);
453 +  end;
454 +  {$endif}
455 +  {$endif}
456    FDBParamsChanged := True;
457    TStringList(FDBParams).OnChange := DBParamsChange;
458    TStringList(FDBParams).OnChanging := DBParamsChanging;
# Line 1194 | Line 1212 | begin
1212    Result := FDataSets.Count;
1213   end;
1214  
1215 + procedure TIBDataBase.ReadState(Reader: TReader);
1216 + begin
1217 +  FDBParams.Clear;
1218 +  inherited ReadState(Reader);
1219 + end;
1220 +
1221   procedure TIBDataBase.SetConnected(Value: boolean);
1222   begin
1223    if StreamedConnected and not AllowStreamedConnected then

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines