diff --git a/components/tvplanit/examples/datastores/zeos/project1.lpi b/components/tvplanit/examples/datastores/zeos/project1.lpi index fba2e6663..3bc04a11b 100644 --- a/components/tvplanit/examples/datastores/zeos/project1.lpi +++ b/components/tvplanit/examples/datastores/zeos/project1.lpi @@ -1,7 +1,7 @@ - + @@ -17,9 +17,10 @@ - - - + + + + diff --git a/components/tvplanit/examples/datastores/zeos/unit1.lfm b/components/tvplanit/examples/datastores/zeos/unit1.lfm index cdbbfed93..f158ee5e3 100644 --- a/components/tvplanit/examples/datastores/zeos/unit1.lfm +++ b/components/tvplanit/examples/datastores/zeos/unit1.lfm @@ -7,7 +7,7 @@ object Form1: TForm1 ClientHeight = 686 ClientWidth = 980 OnCreate = FormCreate - LCLVersion = '1.6.4.0' + LCLVersion = '1.9.0.0' object Panel1: TPanel Left = 0 Height = 33 @@ -160,7 +160,6 @@ object Form1: TForm1 Align = alBottom TabStop = True TabOrder = 1 - KBNavigation = True DateLabelFormat = 'mmmm yyyy' DayHeadAttributes.Font.Height = -13 DayHeadAttributes.Font.Name = 'Tahoma' @@ -169,6 +168,7 @@ object Form1: TForm1 DrawingStyle = dsFlat EventDayStyle = [] HeadAttributes.Color = clBtnFace + KBNavigation = True OffDayColor = clSilver SelectedDayColor = clRed ShowEvents = True @@ -319,7 +319,7 @@ object Form1: TForm1 top = 264 end object VpResourceEditDialog1: TVpResourceEditDialog - Version = 'v1.05' + Version = 'v1.10' DataStore = VpZeosDatastore1 Options = [] Placement.Position = mpCenter diff --git a/components/tvplanit/examples/datastores/zeos/unit1.pas b/components/tvplanit/examples/datastores/zeos/unit1.pas index 6a52cc600..6a9aa05d2 100644 --- a/components/tvplanit/examples/datastores/zeos/unit1.pas +++ b/components/tvplanit/examples/datastores/zeos/unit1.pas @@ -82,6 +82,8 @@ begin ZConnection1.Database := AppendPathDelim(Application.Location) + DBFILENAME; ZConnection1.Protocol := 'sqlite-3'; +// ZConnection1.Connect; // activate this to test issue #33717 + VpZeosDatastore1.Connection := ZConnection1; VpZeosDatastore1.AutoCreate := true; VpZeosDatastore1.Connected := true; diff --git a/components/tvplanit/source/addons/zeos/vpzeosds.pas b/components/tvplanit/source/addons/zeos/vpzeosds.pas index 7444c4beb..ec9c360c1 100644 --- a/components/tvplanit/source/addons/zeos/vpzeosds.pas +++ b/components/tvplanit/source/addons/zeos/vpzeosds.pas @@ -544,11 +544,21 @@ begin exit; // To do: clear planit lists... + if (AValue <> nil) then begin + wasConnected := AValue.Connected; + AValue.Connected := false; + end else + wasConnected := false; + if FConnection <> nil then + Connected := false; + + { if FConnection <> nil then begin wasConnected := FConnection.Connected; Connected := false; end else wasConnected := false; + } FConnection := AValue; FContactsTable.Connection := FConnection; FEventsTable.Connection := FConnection;