Changeset 1297

Show
Ignore:
Timestamp:
2/7/2010 9:18:35 AM (6 weeks ago)
Author:
vessper
Message:

07/02/2010 (1.14.2.1297)


- Core: Added check for Custom Database

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/EveHQ.Core/DataFunctions.vb

    r1276 r1297  
    173173        Select Case EveHQ.Core.HQ.EveHQSettings.DBFormat 
    174174            Case 0 
    175                 If EveHQ.Core.HQ.EveHQSettings.UseAppDirectoryForDB = False Then 
     175                Try 
    176176                    EveHQ.Core.HQ.EveHQDataConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = " & EveHQ.Core.HQ.EveHQSettings.DBDataFilename 
    177                 Else 
    178                     Try 
    179                         Dim FI As New IO.FileInfo(EveHQ.Core.HQ.EveHQSettings.DBDataFilename) 
    180                         EveHQ.Core.HQ.EveHQDataConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = " & Path.Combine(EveHQ.Core.HQ.appFolder, FI.Name) 
    181                     Catch e As Exception 
    182                         MessageBox.Show("There was an error setting the EveHQData connection string: " & e.Message, "Error Forming DB Connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) 
    183                         Return False 
    184                     End Try 
    185                 End If 
     177                Catch e As Exception 
     178                    Dim msg As String = "There was an error setting the EveHQData connection string. Relevant data is as follows:" & ControlChars.CrLf & ControlChars.CrLf 
     179                    msg &= "Error: " & e.Message & ControlChars.CrLf 
     180                    msg &= "DBDataFilename: " & EveHQ.Core.HQ.EveHQSettings.DBDataFilename & ControlChars.CrLf 
     181                    MessageBox.Show(msg, "Error Forming DB Connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) 
     182                End Try 
     183                'If EveHQ.Core.HQ.EveHQSettings.UseAppDirectoryForDB = False Then 
     184                '    EveHQ.Core.HQ.EveHQDataConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = " & EveHQ.Core.HQ.EveHQSettings.DBDataFilename 
     185                'Else 
     186                '    Try 
     187                '        Dim FI As New IO.FileInfo(EveHQ.Core.HQ.EveHQSettings.DBDataFilename) 
     188                '        EveHQ.Core.HQ.EveHQDataConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = " & Path.Combine(EveHQ.Core.HQ.appFolder, FI.Name) 
     189                '    Catch e As Exception 
     190                '        Dim msg As String = "There was an error setting the EveHQData connection string. Relevant data is as follows:" & ControlChars.CrLf & ControlChars.CrLf 
     191                '        msg &= "AppFolder: " & EveHQ.Core.HQ.appFolder 
     192                '        MessageBox.Show("There was an error setting the EveHQData connection string: " & e.Message, "Error Forming DB Connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) 
     193                '        Return False 
     194                '    End Try 
     195                'End If 
    186196            Case 1 
    187197                EveHQ.Core.HQ.EveHQDataConnectionString = "Server=" & EveHQ.Core.HQ.EveHQSettings.DBServer