From a767252c7a28d17944c6bfc3623295fe29e5743c Mon Sep 17 00:00:00 2001 From: joyfullservice Date: Fri, 1 Dec 2023 15:16:19 -0600 Subject: [PATCH] Refactor source modified date for multiple files Some types of components, such as tables, forms, reports, queries, and shared images may use multiple source files to represent a single database component. We may need to check all of the related source files to accurately determine the latest modification date. --- .../modules/IDbComponent.cls | 16 ++++++++++-- .../modules/clsAdpFunction.cls | 19 +++++++++++--- .../modules/clsAdpProcedure.cls | 19 +++++++++++--- .../modules/clsAdpServerView.cls | 19 +++++++++++--- .../modules/clsAdpTable.cls | 19 +++++++++++--- .../modules/clsAdpTrigger.cls | 19 +++++++++++--- .../modules/clsDbConnection.cls | 19 +++++++++++--- .../modules/clsDbDocument.cls | 19 +++++++++++--- .../modules/clsDbForm.cls | 21 ++++++++++++--- .../modules/clsDbHiddenAttribute.cls | 19 +++++++++++--- .../modules/clsDbImexSpec.cls | 19 +++++++++++--- .../modules/clsDbMacro.cls | 19 +++++++++++--- .../modules/clsDbModule.cls | 21 ++++++++++++--- .../modules/clsDbNavPaneGroup.cls | 19 +++++++++++--- .../modules/clsDbProjProperty.cls | 19 +++++++++++--- .../modules/clsDbProject.cls | 19 +++++++++++--- .../modules/clsDbProperty.cls | 19 +++++++++++--- .../modules/clsDbQuery.cls | 25 +++++++++++++++--- .../modules/clsDbRelation.cls | 19 +++++++++++--- .../modules/clsDbReport.cls | 21 ++++++++++++--- .../modules/clsDbSavedSpec.cls | 19 +++++++++++--- .../modules/clsDbSharedImage.cls | 26 ++++++++++++++++--- .../modules/clsDbTableData.cls | 19 +++++++++++--- .../modules/clsDbTableDataMacro.cls | 19 +++++++++++--- .../modules/clsDbTableDef.cls | 22 +++++++++++++--- .../modules/clsDbTheme.cls | 20 +++++++++++--- .../modules/clsDbVbeForm.cls | 22 +++++++++++++--- .../modules/clsDbVbeProject.cls | 19 +++++++++++--- .../modules/clsDbVbeReference.cls | 19 +++++++++++--- .../modules/modFileAccess.bas | 1 + .../modules/modVCSUtility.bas | 4 +-- 31 files changed, 491 insertions(+), 88 deletions(-) diff --git a/Version Control.accda.src/modules/IDbComponent.cls b/Version Control.accda.src/modules/IDbComponent.cls index 3478a3b4..c7ff92b2 100644 --- a/Version Control.accda.src/modules/IDbComponent.cls +++ b/Version Control.accda.src/modules/IDbComponent.cls @@ -124,6 +124,18 @@ Public Function IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Public Function SourceIsModified(strFile As String) As Boolean +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -138,7 +150,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDateDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -147,7 +159,7 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Public Function SourceModified() As Date +Public Function SourceModifiedDate() As Date End Function diff --git a/Version Control.accda.src/modules/clsAdpFunction.cls b/Version Control.accda.src/modules/clsAdpFunction.cls index b170616a..45ef77df 100644 --- a/Version Control.accda.src/modules/clsAdpFunction.cls +++ b/Version Control.accda.src/modules/clsAdpFunction.cls @@ -160,6 +160,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -176,7 +189,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -185,8 +198,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsAdpProcedure.cls b/Version Control.accda.src/modules/clsAdpProcedure.cls index 7ae4348a..48db1571 100644 --- a/Version Control.accda.src/modules/clsAdpProcedure.cls +++ b/Version Control.accda.src/modules/clsAdpProcedure.cls @@ -160,6 +160,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -176,7 +189,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -185,8 +198,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsAdpServerView.cls b/Version Control.accda.src/modules/clsAdpServerView.cls index b542c733..ef856667 100644 --- a/Version Control.accda.src/modules/clsAdpServerView.cls +++ b/Version Control.accda.src/modules/clsAdpServerView.cls @@ -160,6 +160,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -176,7 +189,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -185,8 +198,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsAdpTable.cls b/Version Control.accda.src/modules/clsAdpTable.cls index 0cd38ab7..838aeed8 100644 --- a/Version Control.accda.src/modules/clsAdpTable.cls +++ b/Version Control.accda.src/modules/clsAdpTable.cls @@ -220,6 +220,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -236,7 +249,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -245,8 +258,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsAdpTrigger.cls b/Version Control.accda.src/modules/clsAdpTrigger.cls index f79344a6..bdb71e9a 100644 --- a/Version Control.accda.src/modules/clsAdpTrigger.cls +++ b/Version Control.accda.src/modules/clsAdpTrigger.cls @@ -186,6 +186,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -202,7 +215,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -211,8 +224,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbConnection.cls b/Version Control.accda.src/modules/clsDbConnection.cls index d5a7d1c2..e7cd877c 100644 --- a/Version Control.accda.src/modules/clsDbConnection.cls +++ b/Version Control.accda.src/modules/clsDbConnection.cls @@ -308,6 +308,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -323,7 +336,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 5/17/2021 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -332,8 +345,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbDocument.cls b/Version Control.accda.src/modules/clsDbDocument.cls index 6ceef64f..62f08067 100644 --- a/Version Control.accda.src/modules/clsDbDocument.cls +++ b/Version Control.accda.src/modules/clsDbDocument.cls @@ -395,6 +395,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -411,7 +424,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -420,8 +433,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbForm.cls b/Version Control.accda.src/modules/clsDbForm.cls index f3ca77c8..1fba7d15 100644 --- a/Version Control.accda.src/modules/clsDbForm.cls +++ b/Version Control.accda.src/modules/clsDbForm.cls @@ -221,6 +221,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -237,7 +250,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -246,8 +259,10 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = Largest( _ + GetLastModifiedDate(IDbComponent_SourceFile), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "cls"))) End Function diff --git a/Version Control.accda.src/modules/clsDbHiddenAttribute.cls b/Version Control.accda.src/modules/clsDbHiddenAttribute.cls index 71fd019a..b409a5a2 100644 --- a/Version Control.accda.src/modules/clsDbHiddenAttribute.cls +++ b/Version Control.accda.src/modules/clsDbHiddenAttribute.cls @@ -357,6 +357,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller / Indigo744 @@ -373,7 +386,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller / Indigo744 ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -382,8 +395,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbImexSpec.cls b/Version Control.accda.src/modules/clsDbImexSpec.cls index f76fd49a..6f9df983 100644 --- a/Version Control.accda.src/modules/clsDbImexSpec.cls +++ b/Version Control.accda.src/modules/clsDbImexSpec.cls @@ -375,6 +375,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -391,7 +404,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -400,8 +413,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbMacro.cls b/Version Control.accda.src/modules/clsDbMacro.cls index eca2afcb..55a9745c 100644 --- a/Version Control.accda.src/modules/clsDbMacro.cls +++ b/Version Control.accda.src/modules/clsDbMacro.cls @@ -175,6 +175,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -191,7 +204,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -200,8 +213,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbModule.cls b/Version Control.accda.src/modules/clsDbModule.cls index b23227e3..2577b7f0 100644 --- a/Version Control.accda.src/modules/clsDbModule.cls +++ b/Version Control.accda.src/modules/clsDbModule.cls @@ -356,6 +356,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -372,7 +385,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -381,8 +394,10 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = Largest( _ + GetLastModifiedDate(IDbComponent_SourceFile), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "cls"))) End Function diff --git a/Version Control.accda.src/modules/clsDbNavPaneGroup.cls b/Version Control.accda.src/modules/clsDbNavPaneGroup.cls index 50475577..f14ddd51 100644 --- a/Version Control.accda.src/modules/clsDbNavPaneGroup.cls +++ b/Version Control.accda.src/modules/clsDbNavPaneGroup.cls @@ -475,6 +475,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -490,7 +503,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -499,8 +512,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbProjProperty.cls b/Version Control.accda.src/modules/clsDbProjProperty.cls index 6b4f789e..611d6c55 100644 --- a/Version Control.accda.src/modules/clsDbProjProperty.cls +++ b/Version Control.accda.src/modules/clsDbProjProperty.cls @@ -309,6 +309,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -325,7 +338,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -334,8 +347,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbProject.cls b/Version Control.accda.src/modules/clsDbProject.cls index df058743..2be0a32d 100644 --- a/Version Control.accda.src/modules/clsDbProject.cls +++ b/Version Control.accda.src/modules/clsDbProject.cls @@ -234,6 +234,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -249,7 +262,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 5/17/2021 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -258,8 +271,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbProperty.cls b/Version Control.accda.src/modules/clsDbProperty.cls index 645f79c3..af628e01 100644 --- a/Version Control.accda.src/modules/clsDbProperty.cls +++ b/Version Control.accda.src/modules/clsDbProperty.cls @@ -402,6 +402,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -418,7 +431,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -427,8 +440,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbQuery.cls b/Version Control.accda.src/modules/clsDbQuery.cls index 11e29844..b0503ef9 100644 --- a/Version Control.accda.src/modules/clsDbQuery.cls +++ b/Version Control.accda.src/modules/clsDbQuery.cls @@ -249,6 +249,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -265,7 +278,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -274,8 +287,14 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + If Options.ForceImportOriginalQuerySQL Then + IDbComponent_SourceModifiedDate = Largest( _ + GetLastModifiedDate(IDbComponent_SourceFile), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "sql"))) + Else + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) + End If End Function diff --git a/Version Control.accda.src/modules/clsDbRelation.cls b/Version Control.accda.src/modules/clsDbRelation.cls index 1ecbf3d6..07c31b2f 100644 --- a/Version Control.accda.src/modules/clsDbRelation.cls +++ b/Version Control.accda.src/modules/clsDbRelation.cls @@ -335,6 +335,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -350,7 +363,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -359,8 +372,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbReport.cls b/Version Control.accda.src/modules/clsDbReport.cls index 755c5539..f50d68dc 100644 --- a/Version Control.accda.src/modules/clsDbReport.cls +++ b/Version Control.accda.src/modules/clsDbReport.cls @@ -191,6 +191,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -207,7 +220,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -216,8 +229,10 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = Largest( _ + GetLastModifiedDate(IDbComponent_SourceFile), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "cls"))) End Function diff --git a/Version Control.accda.src/modules/clsDbSavedSpec.cls b/Version Control.accda.src/modules/clsDbSavedSpec.cls index 745ad4ae..fefd5d68 100644 --- a/Version Control.accda.src/modules/clsDbSavedSpec.cls +++ b/Version Control.accda.src/modules/clsDbSavedSpec.cls @@ -248,6 +248,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -264,7 +277,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -273,8 +286,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbSharedImage.cls b/Version Control.accda.src/modules/clsDbSharedImage.cls index c08c4769..39fe1c68 100644 --- a/Version Control.accda.src/modules/clsDbSharedImage.cls +++ b/Version Control.accda.src/modules/clsDbSharedImage.cls @@ -544,6 +544,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -559,7 +572,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -568,8 +581,15 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = Largest( _ + GetLastModifiedDate(IDbComponent_SourceFile), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "jpg")), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "jpeg")), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "jpe")), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "gif")), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "png")), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "ico"))) End Function diff --git a/Version Control.accda.src/modules/clsDbTableData.cls b/Version Control.accda.src/modules/clsDbTableData.cls index ed00152b..237e8463 100644 --- a/Version Control.accda.src/modules/clsDbTableData.cls +++ b/Version Control.accda.src/modules/clsDbTableData.cls @@ -583,6 +583,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -599,7 +612,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -608,8 +621,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbTableDataMacro.cls b/Version Control.accda.src/modules/clsDbTableDataMacro.cls index 3cbb31a5..cd124dae 100644 --- a/Version Control.accda.src/modules/clsDbTableDataMacro.cls +++ b/Version Control.accda.src/modules/clsDbTableDataMacro.cls @@ -220,6 +220,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -236,7 +249,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -245,8 +258,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbTableDef.cls b/Version Control.accda.src/modules/clsDbTableDef.cls index 963558e6..2b85def3 100644 --- a/Version Control.accda.src/modules/clsDbTableDef.cls +++ b/Version Control.accda.src/modules/clsDbTableDef.cls @@ -766,6 +766,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -782,7 +795,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -791,8 +804,11 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + ' The primary source file may be either xml or json + IDbComponent_SourceModifiedDate = Largest( _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "xml")), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "json"))) End Function diff --git a/Version Control.accda.src/modules/clsDbTheme.cls b/Version Control.accda.src/modules/clsDbTheme.cls index f8220657..e8fb38fd 100644 --- a/Version Control.accda.src/modules/clsDbTheme.cls +++ b/Version Control.accda.src/modules/clsDbTheme.cls @@ -503,6 +503,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -518,7 +531,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -527,9 +540,10 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date +Private Function IDbComponent_SourceModifiedDate() As Date '// TODO: Recursively identify the most recent file modified date. - 'If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) + 'If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) + End Function diff --git a/Version Control.accda.src/modules/clsDbVbeForm.cls b/Version Control.accda.src/modules/clsDbVbeForm.cls index a7fb8be7..1e4a13b8 100644 --- a/Version Control.accda.src/modules/clsDbVbeForm.cls +++ b/Version Control.accda.src/modules/clsDbVbeForm.cls @@ -313,6 +313,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -328,7 +341,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -337,8 +350,11 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = Largest( _ + GetLastModifiedDate(IDbComponent_SourceFile), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "frx")), _ + GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "frm"))) End Function diff --git a/Version Control.accda.src/modules/clsDbVbeProject.cls b/Version Control.accda.src/modules/clsDbVbeProject.cls index 5c2730b4..f9436502 100644 --- a/Version Control.accda.src/modules/clsDbVbeProject.cls +++ b/Version Control.accda.src/modules/clsDbVbeProject.cls @@ -362,6 +362,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -377,7 +390,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -386,8 +399,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/clsDbVbeReference.cls b/Version Control.accda.src/modules/clsDbVbeReference.cls index ec0acf6b..6986eec2 100644 --- a/Version Control.accda.src/modules/clsDbVbeReference.cls +++ b/Version Control.accda.src/modules/clsDbVbeReference.cls @@ -380,6 +380,19 @@ Public Function IDbComponent_IsModified() As Boolean End Function +'--------------------------------------------------------------------------------------- +' Procedure : SourceIsModified +' Author : Adam Waller +' Date : 12/1/2023 +' Purpose : Returns true if the source file appears to be modified since the last +' : import or export. (When compared to the index) +'--------------------------------------------------------------------------------------- +' +Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean + +End Function + + '--------------------------------------------------------------------------------------- ' Procedure : DateModified ' Author : Adam Waller @@ -396,7 +409,7 @@ End Function '--------------------------------------------------------------------------------------- -' Procedure : SourceModified +' Procedure : SourceModifiedDate ' Author : Adam Waller ' Date : 4/27/2020 ' Purpose : The date/time the source object was modified. In most cases, this would @@ -405,8 +418,8 @@ End Function ' : allows either approach to be taken. '--------------------------------------------------------------------------------------- ' -Private Function IDbComponent_SourceModified() As Date - If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile) +Private Function IDbComponent_SourceModifiedDate() As Date + IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile) End Function diff --git a/Version Control.accda.src/modules/modFileAccess.bas b/Version Control.accda.src/modules/modFileAccess.bas index 85f7e436..c06e0fc3 100644 --- a/Version Control.accda.src/modules/modFileAccess.bas +++ b/Version Control.accda.src/modules/modFileAccess.bas @@ -562,6 +562,7 @@ End Function ' Author : Adam Waller ' Date : 7/30/2020 ' Purpose : Get the last modified date on a folder or file with Unicode support. +' : Returns 0 (blank date) if the file is not found. '--------------------------------------------------------------------------------------- ' Public Function GetLastModifiedDate(strPath As String) As Date diff --git a/Version Control.accda.src/modules/modVCSUtility.bas b/Version Control.accda.src/modules/modVCSUtility.bas index 002f5fa2..262b6cb8 100644 --- a/Version Control.accda.src/modules/modVCSUtility.bas +++ b/Version Control.accda.src/modules/modVCSUtility.bas @@ -358,8 +358,8 @@ End Function Public Function HasMoreRecentChanges(objItem As IDbComponent) As Boolean ' File dates could be a second off (between exporting the file and saving the report) ' so ignore changes that are less than three seconds apart. - If objItem.DateModified > 0 And objItem.SourceModified > 0 Then - HasMoreRecentChanges = (DateDiff("s", objItem.DateModified, objItem.SourceModified) < -3) + If objItem.DateModified > 0 And objItem.SourceModifiedDate > 0 Then + HasMoreRecentChanges = (DateDiff("s", objItem.DateModified, objItem.SourceModifiedDate) < -3) Else ' If we can't determine one or both of the dates, return true so the ' item is processed as though more recent changes were detected.