Skip to content

Commit

Permalink
split deprecated sqlodbc from new sqlodbc driver
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoulJacobs committed Jun 16, 2020
1 parent 2a83f86 commit 06babb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions M_omConnectionString.def
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ Public Enum ConnectionTypes
Default = 0
SQLOLEDBProvider = 1
LocalDSN = 2
SQLOBDC = 3
SQLODBC_Deprecated = 3
MySQL = 4
SQLODBC = 5
End Enum


Expand Down Expand Up @@ -195,7 +196,7 @@ Public Function GetCurrentConnectionStringForType(ODBCConnection As Boolean, Opt
CurrentConnectionString = "Driver={MySQL ODBC 3.51 Driver};SERVER=[SQLServer];DATABASE=[SQLDatabase];"
ElseIf ConnectionType = ConnectionTypes.LocalDSN Then
CurrentConnectionString = "DSN=[DSN];"
ElseIf GetSQLODBCVersion <> 0 And ConnectionType = SQLOBDC Then
ElseIf GetSQLODBCVersion <> 0 And ConnectionType = SQLODBC Then
If Not ODBCConnection Then
CurrentConnectionString = "DRIVER=ODBC Driver " & cSQLODBCVersion & " for SQL Server;SERVER=[SQLServer];DATABASE=[SQLDatabase];"
Else
Expand Down
2 changes: 1 addition & 1 deletion M_omStartup.def
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Public Function LinkSSMADatabase() As Variant
omSSMAAConnector.LinkUsingSSMA SavePassword:=True, alwaysUpdate:=True
End Function
Public Function LinkSSMADatabaseSQLODBC() As Variant
omSSMAAConnector.LinkUsingSSMA ConnectionType:=SQLOBDC, SavePassword:=True, alwaysUpdate:=True
omSSMAAConnector.LinkUsingSSMA ConnectionType:=SQLODBC_Deprecated, SavePassword:=True, alwaysUpdate:=True
End Function

'Public Function SyncUserMain() As Boolean
Expand Down
6 changes: 5 additions & 1 deletion T_SSMAA_ConnectionTypes.dat
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
</Row_3>
<Row_4>
<field_0 name="Id" binary="false" null="false" value="3"/>
<field_1 name="Name" binary="false" null="false">SQLOBDC</field_1>
<field_1 name="Name" binary="false" null="false">SQLOBDC_Deprecated</field_1>
</Row_4>
<Row_5>
<field_0 name="Id" binary="false" null="false" value="4"/>
<field_1 name="Name" binary="false" null="false">MySQL</field_1>
</Row_5>
<Row_6>
<field_0 name="Id" binary="false" null="false" value="5"/>
<field_1 name="Name" binary="false" null="false">SQLODBC</field_1>
</Row_6>
</Rows>
</TableData>

0 comments on commit 06babb6

Please sign in to comment.