Public Class ConnectionString
    Public Enum ConnectionStringType
        MSSQLServer
        ODBC
        Oracle
    End Enum

    Public Shared Function GetConnectionStringType(pConnectionString As String) As ConnectionStringType
        ' This variable only exists to shorten the if-conditions
        Dim c = pConnectionString

        If (c.Contains("Server=") Or c.Contains("Data Source=")) And (c.Contains("Database=") Or c.Contains("Initial Catalog=")) Then
            Return ConnectionStringType.MSSQLServer
        ElseIf (c.Contains("dsn=")) Then
            Return ConnectionStringType.ODBC
        Else
            Return ConnectionStringType.Oracle
        End If
    End Function
End Class
