Skip to content

Commit

Permalink
Trap any XML import errors
Browse files Browse the repository at this point in the history
  • Loading branch information
joyfullservice committed Dec 12, 2023
1 parent 65f3499 commit 9bb017b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Version Control.accda.src/modules/clsDbTableData.cls
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ Private Sub IDbComponent_Import(strFile As String)
Dim strTempFile As String
Dim strTable As String

If DebugMode(True) Then On Error GoTo 0 Else On Error Resume Next

' Make sure table exists before importing data to it.
strTable = GetObjectNameFromFileName(strFile)

Expand All @@ -391,6 +393,9 @@ Private Sub IDbComponent_Import(strFile As String)
Application.ImportXML strFile, acAppendData
End If

' Trap any XML import errors
CatchAny eelError, "Error importing XML data from '" & strFile & "'", ModuleName(Me) & ".Import"

Case etdTabDelimited
ImportTableDataTDF strFile
End Select
Expand Down

0 comments on commit 9bb017b

Please sign in to comment.