Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
    Merge branch 'joyfullservice:dev' into dev
    Fix issue with orphaned file detection
    Need to pass a dictionary, not a collection to the CompareToIndex function.
    Remove format version from custom groups
    Add alternate XML format function for big files
    Trap any XML import errors
    Include class instancing in code module hash
    Update testing database
    ...
  • Loading branch information
josef-poetzl committed Dec 15, 2023
1 parent c38dd7a commit 471c383
Show file tree
Hide file tree
Showing 48 changed files with 1,244 additions and 1,921 deletions.
3 changes: 3 additions & 0 deletions Testing/Testing.accdb.src/forms/frmMain.cls
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ Public Sub cmdRunTests_Click()
strTest = CurrentProject.AllModules("clsPerson").Name
ShowResult "Class Module exists", (strTest = "clsPerson")

strTest = GetVBProjectForCurrentDB.VBComponents("clsPublic").Properties("Instancing")
ShowResult "Class with Public Creatable Instancing", (strTest = "5")


' Database properties
strTest = ""
Expand Down
13 changes: 13 additions & 0 deletions Testing/Testing.accdb.src/modules/basUtility.bas
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,16 @@ Public Function GetVBProjectForCurrentDB() As VBProject
End If

End Function


'---------------------------------------------------------------------------------------
' Procedure : SetClassInstancing
' Author : Adam Waller
' Date : 11/25/2023
' Purpose : Set the clsPublic class to use Public Creatable instancing.
'---------------------------------------------------------------------------------------
'
Public Sub SetClassInstancing()
Const PublicCreatable = 5
GetVBProjectForCurrentDB.VBComponents("clsPublic").Properties("Instancing") = PublicCreatable
End Sub
20 changes: 20 additions & 0 deletions Testing/Testing.accdb.src/modules/clsPublic.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "clsPublic"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'---------------------------------------------------------------------------------------
' Module : clsPublic
' Author : Adam Waller
' Date : 11/25/2023
' Purpose : This class is set to public creatable instancing.
'---------------------------------------------------------------------------------------

Option Compare Database
Option Explicit

Public MyProperty As String
2 changes: 1 addition & 1 deletion Version Control.accda.src/dbs-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"Type": 10
},
"AppVersion": {
"Value": "4.0.28",
"Value": "4.0.30",
"Type": 10
},
"Auto Compact": {
Expand Down
8 changes: 5 additions & 3 deletions Version Control.accda.src/forms/frmVCSConflictList.bas
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Begin Form
Width =5040
DatasheetFontHeight =11
ItemSuffix =31
Right =15720
Bottom =11745
Right =25320
Bottom =12585
RecSrcDt = Begin
0x9bf1b7f2f3a6e540
End
Expand Down Expand Up @@ -459,11 +459,13 @@ Attribute VB_Exposed = False
Option Compare Database
Option Explicit


'---------------------------------------------------------------------------------------
' Procedure : txtDiff_Click
' Author : Adam Waller
' Date : 5/27/2021
' Purpose : Launch diff program to review changes
' Purpose : Launch diff program to review changes.
' : Note that the changed file is not always the primary source file.
'---------------------------------------------------------------------------------------
'
Private Sub txtDiff_Click()
Expand Down
59 changes: 12 additions & 47 deletions Version Control.accda.src/modules/IDbComponent.cls
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,6 @@ Option Explicit
Public DbObject As Object


'---------------------------------------------------------------------------------------
' Procedure : ClearOrphanedSourceFiles
' Author : Adam Waller
' Date : 4/23/2020
' Purpose : Remove any source files for objects not in the current database.
'---------------------------------------------------------------------------------------
'
Public Sub ClearOrphanedSourceFiles()
End Sub


'---------------------------------------------------------------------------------------
' Procedure : ClearOrphanedDatabaseObjects
' Author : Adam Waller
' Date : 11/3/2021
' Purpose : Remove database objects that are not represented by existing source files.
'---------------------------------------------------------------------------------------
'
Public Sub ClearOrphanedDatabaseObjects()
End Sub


'---------------------------------------------------------------------------------------
' Procedure : Export
' Author : Adam Waller
Expand Down Expand Up @@ -137,20 +115,6 @@ Public Function DateModified() As Date
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
' : be the date/time of the source file, but it some cases like SQL objects
' : the date can be determined through other means, so this function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Public Function SourceModified() As Date
End Function


'---------------------------------------------------------------------------------------
' Procedure : BaseFolder
' Author : Adam Waller
Expand All @@ -172,6 +136,18 @@ Public Property Get SourceFile() As String
End Property


'---------------------------------------------------------------------------------------
' Procedure : FileExtensions
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : A collection of the file extensions used in source files for this
' : component type.
'---------------------------------------------------------------------------------------
'
Public Property Get FileExtensions() As Collection
End Property


'---------------------------------------------------------------------------------------
' Procedure : GetFileList
' Author : Adam Waller
Expand Down Expand Up @@ -251,14 +227,3 @@ End Property
'
Public Property Get QuickCount() As Long
End Property


'---------------------------------------------------------------------------------------
' Procedure : Upgrade
' Author : Adam Waller
' Date : 4/23/2020
' Purpose : Run any version specific upgrade processes before importing.
'---------------------------------------------------------------------------------------
'
Public Sub Upgrade()
End Sub
64 changes: 14 additions & 50 deletions Version Control.accda.src/modules/clsAdpFunction.cls
Original file line number Diff line number Diff line change
Expand Up @@ -124,29 +124,6 @@ Private Function IDbComponent_GetFileList() As Dictionary
End Function


'---------------------------------------------------------------------------------------
' Procedure : ClearOrphanedSourceFiles
' Author : Adam Waller
' Date : 4/23/2020
' Purpose : Remove any source files for objects not in the current database.
'---------------------------------------------------------------------------------------
'
Private Sub IDbComponent_ClearOrphanedSourceFiles()
ClearOrphanedSourceFiles Me, "sql"
End Sub


'---------------------------------------------------------------------------------------
' Procedure : ClearOrphanedDatabaseObjects
' Author : Adam Waller
' Date : 11/3/2021
' Purpose : Remove database objects that are not represented by existing source files.
'---------------------------------------------------------------------------------------
'
Public Sub IDbComponent_ClearOrphanedDatabaseObjects()
End Sub


'---------------------------------------------------------------------------------------
' Procedure : IsModified
' Author : Adam Waller
Expand Down Expand Up @@ -175,21 +152,6 @@ Private Function IDbComponent_DateModified() As Date
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
' : be the date/time of the source file, but it some cases like SQL objects
' : the date can be determined through other means, so this function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


'---------------------------------------------------------------------------------------
' Procedure : Category
' Author : Adam Waller
Expand All @@ -213,6 +175,20 @@ Private Property Get IDbComponent_BaseFolder() As String
End Property


'---------------------------------------------------------------------------------------
' Procedure : FileExtensions
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : A collection of the file extensions used in source files for this
' : component type.
'---------------------------------------------------------------------------------------
'
Private Property Get IDbComponent_FileExtensions() As Collection
Set IDbComponent_FileExtensions = New Collection
IDbComponent_FileExtensions.Add "sql"
End Property


'---------------------------------------------------------------------------------------
' Procedure : Name
' Author : Adam Waller
Expand Down Expand Up @@ -279,18 +255,6 @@ Private Property Get IDbComponent_ComponentType() As eDatabaseComponentType
End Property


'---------------------------------------------------------------------------------------
' Procedure : Upgrade
' Author : Adam Waller
' Date : 4/23/2020
' Purpose : Run any version specific upgrade processes before importing.
'---------------------------------------------------------------------------------------
'
Private Sub IDbComponent_Upgrade()
' No upgrade needed.
End Sub


'---------------------------------------------------------------------------------------
' Procedure : DbObject
' Author : Adam Waller
Expand Down
64 changes: 14 additions & 50 deletions Version Control.accda.src/modules/clsAdpProcedure.cls
Original file line number Diff line number Diff line change
Expand Up @@ -124,29 +124,6 @@ Private Function IDbComponent_GetFileList() As Dictionary
End Function


'---------------------------------------------------------------------------------------
' Procedure : ClearOrphanedSourceFiles
' Author : Adam Waller
' Date : 4/23/2020
' Purpose : Remove any source files for objects not in the current database.
'---------------------------------------------------------------------------------------
'
Private Sub IDbComponent_ClearOrphanedSourceFiles()
ClearOrphanedSourceFiles Me, "sql"
End Sub


'---------------------------------------------------------------------------------------
' Procedure : ClearOrphanedDatabaseObjects
' Author : Adam Waller
' Date : 11/3/2021
' Purpose : Remove database objects that are not represented by existing source files.
'---------------------------------------------------------------------------------------
'
Public Sub IDbComponent_ClearOrphanedDatabaseObjects()
End Sub


'---------------------------------------------------------------------------------------
' Procedure : IsModified
' Author : Adam Waller
Expand Down Expand Up @@ -175,21 +152,6 @@ Private Function IDbComponent_DateModified() As Date
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
' : be the date/time of the source file, but it some cases like SQL objects
' : the date can be determined through other means, so this function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


'---------------------------------------------------------------------------------------
' Procedure : Category
' Author : Adam Waller
Expand All @@ -213,6 +175,20 @@ Private Property Get IDbComponent_BaseFolder() As String
End Property


'---------------------------------------------------------------------------------------
' Procedure : FileExtensions
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : A collection of the file extensions used in source files for this
' : component type.
'---------------------------------------------------------------------------------------
'
Private Property Get IDbComponent_FileExtensions() As Collection
Set IDbComponent_FileExtensions = New Collection
IDbComponent_FileExtensions.Add "sql"
End Property


'---------------------------------------------------------------------------------------
' Procedure : Name
' Author : Adam Waller
Expand Down Expand Up @@ -279,18 +255,6 @@ Private Property Get IDbComponent_ComponentType() As eDatabaseComponentType
End Property


'---------------------------------------------------------------------------------------
' Procedure : Upgrade
' Author : Adam Waller
' Date : 4/23/2020
' Purpose : Run any version specific upgrade processes before importing.
'---------------------------------------------------------------------------------------
'
Private Sub IDbComponent_Upgrade()
' No upgrade needed.
End Sub


'---------------------------------------------------------------------------------------
' Procedure : DbObject
' Author : Adam Waller
Expand Down
Loading

0 comments on commit 471c383

Please sign in to comment.