From 27d0a07a4914fdad1c40180c91904ed2d75ce01d Mon Sep 17 00:00:00 2001 From: Raoul Jacobs Date: Mon, 20 Apr 2020 20:38:25 +0200 Subject: [PATCH] Rename field group to groups in table T_SSMAA_ODBC_Tables since multiple groups can be listed. Refactor code to handle changed field name. --- M_omConnectionString.def | 6 ++--- M_omDAOFunctions.def | 6 ++--- M_omDateFunctions.def | 10 +++---- M_omDefaults.def | 4 +-- M_omFileFunctions.def | 4 +-- M_omMSAccessFunctions.def | 22 ++++++++-------- M_omSSMAAConnector.def | 50 +++++++++++++++++------------------ T_SSMAA_ConnectionTypes.dat | 20 +++++++------- T_SSMAA_ConnectionTypes.def | 28 +------------------- T_SSMAA_ODBC_Tables.def | 52 +++++++++++++------------------------ 10 files changed, 80 insertions(+), 122 deletions(-) diff --git a/M_omConnectionString.def b/M_omConnectionString.def index 0397d69..b91e4ad 100644 --- a/M_omConnectionString.def +++ b/M_omConnectionString.def @@ -53,16 +53,16 @@ Public Sub ParseByQueryName(Name As String) queryName = Name Parse CurrentDb.QueryDefs(queryName).Connect On Error Resume Next - Description = CurrentDb.QueryDefs(queryName).Properties("Description").value + Description = CurrentDb.QueryDefs(queryName).Properties("Description").Value Group = omStringFunctions.ParseValue(Description, "Group", splitchar:=";", notFoundValue:="") End If End Sub -Private Sub Parse(value As String) +Private Sub Parse(Value As String) Dim arr() As String Dim S As Variant - arr = Split(value, ";") + arr = Split(Value, ";") For Each S In arr 'Debug.Print s If S = "ODBC" Then IsODBC = True diff --git a/M_omDAOFunctions.def b/M_omDAOFunctions.def index b58d7e7..fe37260 100644 --- a/M_omDAOFunctions.def +++ b/M_omDAOFunctions.def @@ -1,13 +1,13 @@ Option Compare Database Option Explicit -Public Sub SetQueryDefProperty(queryName As String, propertyName As String, value As String, Optional propertyType As DAO.DataTypeEnum = dbText) +Public Sub SetQueryDefProperty(queryName As String, propertyName As String, Value As String, Optional propertyType As DAO.DataTypeEnum = dbText) Dim prp As DAO.Property On Error Resume Next - Set prp = CurrentDb.QueryDefs(queryName).CreateProperty(propertyName, propertyType, value) + Set prp = CurrentDb.QueryDefs(queryName).CreateProperty(propertyName, propertyType, Value) CurrentDb.QueryDefs(queryName).Properties.Append prp If Err = 3367 Then - CurrentDb.QueryDefs(queryName).Properties(propertyName).value = value + CurrentDb.QueryDefs(queryName).Properties(propertyName).Value = Value End If On Error GoTo 0 End Sub \ No newline at end of file diff --git a/M_omDateFunctions.def b/M_omDateFunctions.def index 4267ef3..6013282 100644 --- a/M_omDateFunctions.def +++ b/M_omDateFunctions.def @@ -132,9 +132,9 @@ End Function Public Function WorkingDays(ByVal lYearMonth As Long) As Long Dim dateWork As Date - dateWork = "01/" & Str(lYearMonth Mod 100) & "/" & Str(Int(lYearMonth / 100)) + dateWork = "01/" & str(lYearMonth Mod 100) & "/" & str(Int(lYearMonth / 100)) If Month(dateWork) <> (lYearMonth Mod 100) Then - dateWork = Str(lYearMonth Mod 100) & "/01/" & Str(Int(lYearMonth / 100)) + dateWork = str(lYearMonth Mod 100) & "/01/" & str(Int(lYearMonth / 100)) End If While lYearMonth Mod 100 = Month(dateWork) If Weekday(dateWork, vbMonday) > 0 And Weekday(dateWork, vbMonday) < 6 Then @@ -149,7 +149,7 @@ Dim dateWork As Date If IsDate(dateFrom) Then dateWork = dateFrom If Month(dateWork) <> (lYearMonth Mod 100) Then - dateWork = Str(lYearMonth Mod 100) & "/" & Month(dateWork) & "/" & Str(Int(lYearMonth / 100)) + dateWork = str(lYearMonth Mod 100) & "/" & Month(dateWork) & "/" & str(Int(lYearMonth / 100)) End If While lYearMonth Mod 100 = Month(dateWork) If Weekday(dateWork, vbMonday) > 0 And Weekday(dateWork, vbMonday) < 6 Then @@ -168,7 +168,7 @@ Dim dateWork As Date If IsDate(dateFrom) Then dateWork = dateFrom If Month(dateWork) <> (lYearMonth Mod 100) Then - dateWork = Str(lYearMonth Mod 100) & "/" & Month(dateWork) & "/" & Str(Int(lYearMonth / 100)) + dateWork = str(lYearMonth Mod 100) & "/" & Month(dateWork) & "/" & str(Int(lYearMonth / 100)) End If While lYearMonth Mod 100 = Month(dateWork) If Weekday(dateWork, vbMonday) > 0 And Weekday(dateWork, vbMonday) < 6 Then @@ -403,7 +403,7 @@ Dim maxDate As Date minDate = Nz(DMax("Date", "Calendar"), DateSerial(2017, 1, 1) - 1) + 1 maxDate = DateSerial(Year(Now) + 2, 1, 1) - 1 - rs.Open "Calendar", CurrentProject.Connection, adOpenForwardOnly, adLockOptimistic + rs.Open "Calendar", CurrentProject.connection, adOpenForwardOnly, adLockOptimistic While minDate <= maxDate rs.AddNew rs("Date") = minDate diff --git a/M_omDefaults.def b/M_omDefaults.def index 132c1b0..3f6b996 100644 --- a/M_omDefaults.def +++ b/M_omDefaults.def @@ -63,12 +63,12 @@ Dim tableName As String Initialized = False If omMSAccessFunctions.TableExists(tableName) Then cmdGetValue.commandText = "SELECT [Value],[ModifyDate] FROM " & tableName & " WHERE [Name]=?" - cmdGetValue.ActiveConnection = CurrentProject.Connection + cmdGetValue.ActiveConnection = CurrentProject.connection cmdGetValue.Parameters.Refresh ' Does Not Work if there is a mistake in the SQL statement EG not existing Table 'cmdGetValue.Parameters.Append cmdGetValue.CreateParameter("Name", adVarWChar, adParamInput, 256) cmdSetValue.commandText = "UPDATE [" & IIf(gMode = LocalMode, "omSysDefaults", "omDefaults") & "] SET [Value]=?,[ModifyDate]=? WHERE [Name]=?" - cmdSetValue.ActiveConnection = CurrentProject.Connection + cmdSetValue.ActiveConnection = CurrentProject.connection cmdSetValue.Parameters.Refresh 'cmdSetValue.Parameters.Append cmdGetValue.CreateParameter("Value", adVarChar, adParamInput, 256) 'cmdSetValue.Parameters.Append cmdGetValue.CreateParameter("ModifyDate", adDate, adParamInput) diff --git a/M_omFileFunctions.def b/M_omFileFunctions.def index e368359..f879599 100644 --- a/M_omFileFunctions.def +++ b/M_omFileFunctions.def @@ -159,7 +159,7 @@ Dim F As Scripting.File DoCmd.SetWarnings False DoCmd.RunSQL "DELETE * FROM [" & tableName & "]" DoCmd.SetWarnings True - rs.Open tableName, CurrentProject.Connection, adOpenForwardOnly, adLockOptimistic + rs.Open tableName, CurrentProject.connection, adOpenForwardOnly, adLockOptimistic For Each F In gFso.GetFolder(folderPath).Files If InStr(1, F.Name, pattern) <> 0 And InStr(1, F.Name, "~") = 0 Then rs.AddNew @@ -184,7 +184,7 @@ Public Function FileLocked(strFileName As String, Optional displayError As Boole If Err.Number <> 0 Then ' Display the error number and description. If displayError Then - MsgBox "Error #" & Str(Err.Number) & " - " & Err.Description + MsgBox "Error #" & str(Err.Number) & " - " & Err.Description End If FileLocked = True Err.Clear diff --git a/M_omMSAccessFunctions.def b/M_omMSAccessFunctions.def index 2f98904..bf3c2ae 100644 --- a/M_omMSAccessFunctions.def +++ b/M_omMSAccessFunctions.def @@ -31,12 +31,12 @@ Public Sub DeleteQuery(queryName As String) CurrentDb.QueryDefs.Delete queryName End If End Sub -Public Sub CreatePassthroughQuery(queryName As String, sql As String, Connection As String) +Public Sub CreatePassthroughQuery(queryName As String, sql As String, connection As String) Dim qd As QueryDef DeleteQuery queryName Set qd = CurrentDb.CreateQueryDef(queryName) - qd.Connect = Connection + qd.Connect = connection qd.sql = sql CurrentDb.QueryDefs.Refresh End Sub @@ -70,7 +70,7 @@ End Sub Public Sub ConvertToLocalTables(Optional databaseType As String = ".accdb") Dim rs As New ADODB.Recordset - rs.Open "SELECT Name,Database,lv FROM MsysObjects WHERE [Type]=6 AND LV IS NOT NULL", CurrentProject.Connection, adOpenForwardOnly, adLockReadOnly + rs.Open "SELECT Name,Database,lv FROM MsysObjects WHERE [Type]=6 AND LV IS NOT NULL", CurrentProject.connection, adOpenForwardOnly, adLockReadOnly While Not rs.EOF If (omStringFunctions.IsNullOrEmpty(databaseType) Or InStr(1, rs("Database"), databaseType) > 0) And InStr(1, rs("Name"), "~") = 0 Then 'On Error Resume Next @@ -119,7 +119,7 @@ Dim idx As DAO.index omMSAccessFunctions.DeleteTable tempTableName gLogging.WriteToFile Description:="MakeLinkedTable > DeleteTable tempTableName" - CurrentProject.Connection.Execute "SELECT * INTO [" & tempTableName & "] FROM [" & tableName & "]" + CurrentProject.connection.Execute "SELECT * INTO [" & tempTableName & "] FROM [" & tableName & "]" gLogging.WriteToFile Description:="MakeLinkedTable > SELECT INTO FROM" ' copy existing indexes Workspaces(0).Databases(0).TableDefs.Refresh @@ -169,7 +169,7 @@ End Sub Public Sub DropIndexUsingSQL(tableName As String, indexName As String) On Error Resume Next - CurrentProject.Connection.Execute StringFormat("DROP INDEX [{0}] ON [{1}]", indexName, tableName) + CurrentProject.connection.Execute StringFormat("DROP INDEX [{0}] ON [{1}]", indexName, tableName) End Sub Public Sub CreateIndexUsingSQL(tableName As String, indexName As String, fieldNames As String, Optional setPrimary As Boolean = False, Optional setUnique As Boolean = False, Optional setDisallowNull As Boolean = False) @@ -183,7 +183,7 @@ Dim sql As String End If DropIndexUsingSQL tableName, indexName gLogging.WriteToFile Description:="CreateIndexUsingSQL > DropIndexUsingSQL tableName, indexName" - CurrentProject.Connection.Execute sql + CurrentProject.connection.Execute sql gLogging.WriteToFile Description:="CreateIndexUsingSQL > CurrentProject.Connection.Execute sql" End Sub @@ -228,8 +228,8 @@ Dim ctl As Control On Error GoTo FormFields_Extract_Error - rsMSysObject.Open "SELECT Name, Type FROM msysobjects WHERE (((Type)=-32768 Or (Type)=-32764))", CurrentProject.Connection, adOpenDynamic, adLockOptimistic - rsFields.Open "Fields", CurrentProject.Connection, adOpenDynamic, adLockOptimistic + rsMSysObject.Open "SELECT Name, Type FROM msysobjects WHERE (((Type)=-32768 Or (Type)=-32764))", CurrentProject.connection, adOpenDynamic, adLockOptimistic + rsFields.Open "Fields", CurrentProject.connection, adOpenDynamic, adLockOptimistic While Not rsMSysObject.EOF Select Case rsMSysObject("Type") Case -32768 ' Form @@ -284,13 +284,13 @@ Dim ctl As Object On Error GoTo cmdBarFields_Extract_Error - rsFields.Open "Fields", CurrentProject.Connection, adOpenDynamic, adLockOptimistic + rsFields.Open "Fields", CurrentProject.connection, adOpenDynamic, adLockOptimistic If strcmdBar <> "" Then For Each ctl In CommandBars(strcmdBar).Controls With ctl rsFields.AddNew rsFields("Field_ID") = newField_ID - rsFields("Field_Name") = .tag + rsFields("Field_Name") = .Tag rsFields.Update If .Type = 10 Then cmdBarFields_Extract "", ctl @@ -302,7 +302,7 @@ Dim ctl As Object With ctl rsFields.AddNew rsFields("Field_ID") = newField_ID - rsFields("Field_Name") = .tag + rsFields("Field_Name") = .Tag rsFields.Update If .Type = 10 Then cmdBarFields_Extract "", ctl diff --git a/M_omSSMAAConnector.def b/M_omSSMAAConnector.def index 1e2d017..6d209c1 100644 --- a/M_omSSMAAConnector.def +++ b/M_omSSMAAConnector.def @@ -70,8 +70,8 @@ Dim strDatabaseName As String UpdateSSMAConnectionString Group, ConnectionType rs.Open "SELECT Name, Type FROM MSysObjects WHERE Type=1 OR Type=6 OR Type=4", LocalCon, adOpenStatic, adLockReadOnly - 'rsODBC.Open "SELECT * FROM SSMAA_ODBC_Tables" & IIf(Group <> "", " WHERE [Groups] like " & Chr(34) & "%," & Group & ",%" & Chr(34), ""), LocalCon, adOpenForwardOnly, adLockOptimistic - rsODBC.Open "SELECT * FROM SSMAA_ODBC_Tables" & IIf(Group <> "", " WHERE [Group] like " & Chr(34) & "%," & Group & ",%" & Chr(34), ""), LocalCon, adOpenForwardOnly, adLockOptimistic + rsODBC.Open "SELECT * FROM SSMAA_ODBC_Tables" & IIf(Group <> "", " WHERE [Groups] like " & Chr(34) & "%," & Group & ",%" & Chr(34), ""), LocalCon, adOpenForwardOnly, adLockOptimistic + 'rsODBC.Open "SELECT * FROM SSMAA_ODBC_Tables" & IIf(Group <> "", " WHERE [Group] like " & Chr(34) & "%," & Group & ",%" & Chr(34), ""), LocalCon, adOpenForwardOnly, adLockOptimistic While Not rsODBC.EOF 'rs.Requery rs.Filter = "Name='" & rsODBC("ODBCTable") & "'" @@ -117,8 +117,8 @@ Dim rs As New ADODB.Recordset Dim cmd As New ADODB.Command Set omCSLastUsed = New omConnectionString - 'cmd.CommandText = "UPDATE SSMAA_ODBC_Tables SET ConnectionString=? WHERE nz([Groups],'')=? AND nz(DSN,'')=? AND nz(SQLServer,'')=? AND nz(SQLServerPort,'')=? AND nz(SQLDatabase,'')=? AND nz(ConnectionTypeId,'')=? AND nz(SQLLogin,'')=? AND nz(SQLPassword,'')=?" - cmd.commandText = "UPDATE SSMAA_ODBC_Tables SET ConnectionString=? WHERE nz([Group],'')=? AND nz(DSN,'')=? AND nz(SQLServer,'')=? AND nz(SQLServerPort,'')=? AND nz(SQLDatabase,'')=? AND nz(ConnectionTypeId,'')=? AND nz(SQLLogin,'')=? AND nz(SQLPassword,'')=?" + cmd.commandText = "UPDATE SSMAA_ODBC_Tables SET ConnectionString=? WHERE nz([Groups],'')=? AND nz(DSN,'')=? AND nz(SQLServer,'')=? AND nz(SQLServerPort,'')=? AND nz(SQLDatabase,'')=? AND nz(ConnectionTypeId,'')=? AND nz(SQLLogin,'')=? AND nz(SQLPassword,'')=?" + 'cmd.commandText = "UPDATE SSMAA_ODBC_Tables SET ConnectionString=? WHERE nz([Group],'')=? AND nz(DSN,'')=? AND nz(SQLServer,'')=? AND nz(SQLServerPort,'')=? AND nz(SQLDatabase,'')=? AND nz(ConnectionTypeId,'')=? AND nz(SQLLogin,'')=? AND nz(SQLPassword,'')=?" cmd.ActiveConnection = LocalCon cmd.Parameters.Append cmd.CreateParameter("p1", adVarWChar, adParamInput, 512) cmd.Parameters.Append cmd.CreateParameter("p2", adLongVarWChar, adParamInput, 256) @@ -130,13 +130,13 @@ Dim cmd As New ADODB.Command cmd.Parameters.Append cmd.CreateParameter("p8", adLongVarWChar, adParamInput, 256) cmd.Parameters.Append cmd.CreateParameter("p9", adLongVarWChar, adParamInput, 256) - 'rs.Open "SELECT [Groups], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword From SSMAA_ODBC_Tables " & IIf(Group <> "", " WHERE [Groups] like " & Chr(34) & "%," & Group & ",%" & Chr(34), "") & " GROUP BY [Groups], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword", LocalCon, adOpenForwardOnly, adLockReadOnly - rs.Open "SELECT [Group], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword From SSMAA_ODBC_Tables " & IIf(Group <> "", " WHERE [Group] like " & Chr(34) & "%," & Group & ",%" & Chr(34), "") & " GROUP BY [Group], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword", LocalCon, adOpenForwardOnly, adLockReadOnly + rs.Open "SELECT [Groups], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword From SSMAA_ODBC_Tables " & IIf(Group <> "", " WHERE [Groups] like " & Chr(34) & "%," & Group & ",%" & Chr(34), "") & " GROUP BY [Groups], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword", LocalCon, adOpenForwardOnly, adLockReadOnly + 'rs.Open "SELECT [Group], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword From SSMAA_ODBC_Tables " & IIf(Group <> "", " WHERE [Group] like " & Chr(34) & "%," & Group & ",%" & Chr(34), "") & " GROUP BY [Group], DSN, SQLServer, SQLServerPort, SQLDatabase, ConnectionTypeId, SQLLogin, SQLPassword", LocalCon, adOpenForwardOnly, adLockReadOnly While Not rs.EOF - 'cmd.Parameters(0) = omCSLastUsed.GetConnectionString(Nz(rs("sqlDatabase"), ""), Nz(rs("SQLServer"), ""), False, Nz(rs("ConnectionTypeId"), ConnectionType), Nz(rs("DSN"), ""), Nz(rs("SQLLogin"), ""), Nz(rs("SQLPassword"), ""), Nz(rs("Groups"), ""), Nz(rs("SQLServerPort"), "")) - cmd.Parameters(0) = omCSLastUsed.GetConnectionString(Nz(rs("sqlDatabase"), ""), Nz(rs("SQLServer"), ""), False, Nz(rs("ConnectionTypeId"), ConnectionType), Nz(rs("DSN"), ""), Nz(rs("SQLLogin"), ""), Nz(rs("SQLPassword"), ""), Nz(rs("Group"), ""), Nz(rs("SQLServerPort"), "")) - 'cmd.Parameters(1) = Nz(rs("Groups"), "") - cmd.Parameters(1) = Nz(rs("Group"), "") + cmd.Parameters(0) = omCSLastUsed.GetConnectionString(Nz(rs("sqlDatabase"), ""), Nz(rs("SQLServer"), ""), False, Nz(rs("ConnectionTypeId"), ConnectionType), Nz(rs("DSN"), ""), Nz(rs("SQLLogin"), ""), Nz(rs("SQLPassword"), ""), Nz(rs("Groups"), ""), Nz(rs("SQLServerPort"), "")) + 'cmd.Parameters(0) = omCSLastUsed.GetConnectionString(Nz(rs("sqlDatabase"), ""), Nz(rs("SQLServer"), ""), False, Nz(rs("ConnectionTypeId"), ConnectionType), Nz(rs("DSN"), ""), Nz(rs("SQLLogin"), ""), Nz(rs("SQLPassword"), ""), Nz(rs("Group"), ""), Nz(rs("SQLServerPort"), "")) + cmd.Parameters(1) = Nz(rs("Groups"), "") + 'cmd.Parameters(1) = Nz(rs("Group"), "") cmd.Parameters(2) = Nz(rs("DSN"), "") cmd.Parameters(3) = Nz(rs("SQLServer"), "") cmd.Parameters(4) = Nz(rs("SQLServerPort"), "") @@ -219,8 +219,8 @@ Dim strFilter As String strFilter = strFilter & IIf(NotIsNullOrEmpty(databaseName), " AND sqldatabase='{1}'", "") strFilter = strFilter & IIf(NotIsNullOrEmpty(serverName), " AND sqlserver='{2}'", "") strFilter = strFilter & IIf(NotIsNullOrEmpty(dsnName), " AND dsn='{3}'", "") - strFilter = strFilter & IIf(NotIsNullOrEmpty(groupName), " AND group like '%,{4},%'", "") - 'strFilter = strFilter & IIf(NotIsNullOrEmpty(groupName), " AND groups like '%,{4},%'", "") + 'strFilter = strFilter & IIf(NotIsNullOrEmpty(groupName), " AND group like '%,{4},%'", "") + strFilter = strFilter & IIf(NotIsNullOrEmpty(groupName), " AND groups like '%,{4},%'", "") If NotIsNullOrEmpty(strFilter) Then rs.Filter = StringFormat(Mid(strFilter, 6), tableName, databaseName, serverName, dsnName, groupName) If rs.EOF Then @@ -254,8 +254,8 @@ Dim strFilter As String If NotIsNullOrEmpty(strFilter) Then rs.Filter = StringFormat(Mid(strFilter, 6), tableName, databaseName, serverName, dsnName) If Not rs.EOF Then - GetGroupByProperty = rs("Group") - 'GetGroupByProperty = rs("Groups") + 'GetGroupByProperty = rs("Group") + GetGroupByProperty = rs("Groups") If NotIsNullOrEmpty(GetGroupByProperty) Then If Left(GetGroupByProperty, 1) = "," Then GetGroupByProperty = Mid(GetGroupByProperty, 2) @@ -302,8 +302,8 @@ Dim t As String rsTable("SQLDatabase") = omCSTest.Database rsTable("SQLLogin") = omCSTest.UID rsTable("SQLPassword") = omCSTest.PWD - rsTable("Group") = omCSTest.DSN - 'rsTable("Groups") = omCSTest.DSN + 'rsTable("Group") = omCSTest.DSN + rsTable("Groups") = omCSTest.DSN t = CurrentDb.TableDefs(rs("Name")).SourceTableName If InStr(1, t, ".") = 0 Then rsTable("SQLTableOwner") = "" @@ -535,14 +535,14 @@ Public Sub LinkMSAccess(Optional linkLocal As Boolean = False) Dim tblCon As New omTableConnector Dim DefaultPath As String Dim dataPath As String -Dim FileName As String +Dim filename As String - FileName = omFileFunctions.RemoveExtension(CurrentProject.Name) - If InStrRev(FileName, "_client") > 0 Then - FileName = Replace(FileName, "_client", "") + filename = omFileFunctions.RemoveExtension(CurrentProject.Name) + If InStrRev(filename, "_client") > 0 Then + filename = Replace(filename, "_client", "") End If - FileName = FileName & "_Data" + filename = filename & "_Data" gSystemDefaults.Mode = LocalMode gSystemDefaults.Development = gDevelopmentMode If linkLocal Then @@ -551,15 +551,15 @@ Dim FileName As String dataPath = Nz(gSystemDefaults.Load("DataPath"), "") End If - DefaultPath = omFileFunctions.BuildPathFileExists(dataPath, FileName & ".mdb") + DefaultPath = omFileFunctions.BuildPathFileExists(dataPath, filename & ".mdb") If DefaultPath = "" Then - DefaultPath = omFileFunctions.BuildPathFileExists(dataPath, FileName & ".accdb") + DefaultPath = omFileFunctions.BuildPathFileExists(dataPath, filename & ".accdb") End If If DefaultPath = "" Then - DefaultPath = omFileFunctions.BuildPathFileExists(CurrentProject.path, FileName & ".mdb") + DefaultPath = omFileFunctions.BuildPathFileExists(CurrentProject.path, filename & ".mdb") End If If DefaultPath = "" Then - DefaultPath = omFileFunctions.BuildPathFileExists(CurrentProject.path, FileName & ".accdb") + DefaultPath = omFileFunctions.BuildPathFileExists(CurrentProject.path, filename & ".accdb") End If If Not gFso.FileExists(DefaultPath) Then MsgBox "No Data file was found at the location: " & DefaultPath & vbCrLf & "Application will now be closed.", vbCritical diff --git a/T_SSMAA_ConnectionTypes.dat b/T_SSMAA_ConnectionTypes.dat index f15bd2c..86d26fa 100644 --- a/T_SSMAA_ConnectionTypes.dat +++ b/T_SSMAA_ConnectionTypes.dat @@ -2,24 +2,24 @@ - - Default + + Default - - SQLOLEDBProvider + + SQLOLEDBProvider - - LocalDSN + + LocalDSN - - SQLOBDC + + SQLOBDC - - MySQL + + MySQL diff --git a/T_SSMAA_ConnectionTypes.def b/T_SSMAA_ConnectionTypes.def index 04041bf..8a09121 100644 --- a/T_SSMAA_ConnectionTypes.def +++ b/T_SSMAA_ConnectionTypes.def @@ -16,7 +16,7 @@ - + @@ -78,30 +78,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/T_SSMAA_ODBC_Tables.def b/T_SSMAA_ODBC_Tables.def index 4949ae4..5c6cea2 100644 --- a/T_SSMAA_ODBC_Tables.def +++ b/T_SSMAA_ODBC_Tables.def @@ -11,7 +11,7 @@ [SQLTableOwner] TEXT (100), [SQLTable] TEXT (255), [ODBCTable] TEXT (255), -[Group] TEXT (50), +[Groups] TEXT (50), [PrimaryKey] TEXT (255), [Sort] DOUBLE, [ConnectionString] MEMO, @@ -51,7 +51,7 @@ - + @@ -59,6 +59,8 @@ + + @@ -127,6 +129,8 @@ + + @@ -338,15 +342,15 @@ - + - + - + @@ -411,7 +415,7 @@ - + @@ -473,6 +477,8 @@ + + @@ -512,7 +518,7 @@ - + @@ -539,11 +545,13 @@ + + - + @@ -582,32 +590,8 @@ + + - - - - - - - - - - - - - - - - - - - - - - - - - -