pre cutover push

This commit is contained in:
Infineon\StieberD
2024-09-04 20:33:41 -07:00
parent 6ea6969f4b
commit 7762b129af
2072 changed files with 130000 additions and 95295 deletions

View File

@ -237,30 +237,8 @@ Service WriteDataRowToSQL(OITableName, OIKeyID, OIRow, OIColumns)
If Error_Services('NoError') then
// Confirm if row already exists. This will determine if an INSERT or UPDATE should be made.
PrimarySQLTableName = SQL_Services('GetPrimarySQLTable', OITableName)
* If @User4 EQ 'DANIEL_ST' then
TransactionQueries = SQL_Services('GetSQLMergeStatements', OITableName, OIKeyID, OIRow, OIColumns)
* end else
* JoinClause = SQL_Services('GetJoinClause', OITableName, PrimarySQLTableName, OIKeyID, OIRow)
* SQLStatement = 'SELECT TOP 1 * FROM ' : PrimarySQLTablename : ' WHERE ' : JoinClause
* RowData = SQL_Services('ExecuteQuery', objConnection, SQLStatement, True$)
*
* If RowData EQ '' then
* // Create the INSERT statements to store the data in SQL.
* TransactionQueries = SQL_Services('GetSQLInsertStatements', OITableName, OIKeyID, OIRow, OIColumns)
* IF @UserName EQ 'DAN_CR' OR @User4 EQ 'DAN_CR' then
* Message = TransactionQueries
* Gosub WriteLog
* end
* end else
* // Create the UPDATE statements to store the data in SQL.
* TransactionQueries = SQL_Services('GetSQLUpdateStatements', OITableName, OIKeyID, OIRow, OIColumns)
* end
* end
PrimarySQLTableName = SQL_Services('GetPrimarySQLTable', OITableName)
TransactionQueries = SQL_Services('GetSQLMergeStatements', OITableName, OIKeyID, OIRow, OIColumns)
end
If Error_Services('NoError') AND (TransactionQueries NE '') then
@ -839,32 +817,17 @@ Service GetConnectionString(Server)
end else
If (Server NE '') then
* Domain = Active_Directory_Services('GetComputerDomain')
* Begin Case
* Case Domain _EQC 'infineon.com'
// Prod Stealth
ConnectionString = Database_Services('ReadDataRow', 'SERVERS', Server:'_STEALTH')
* Case Domain _EQC 'ec.local'
* // Prod EC
* ConnectionString = Database_Services('ReadDataRow', 'SERVERS', Server)
* Case Otherwise$
* // Default Prod EC
* ConnectionString = Database_Services('ReadDataRow', 'SERVERS', Server)
* End Case
// Prod Stealth
ConnectionString = Database_Services('ReadDataRow', 'SERVERS', Server)
If ConnectionString NE '' then
ConnectionString = Delete(ConnectionString, 2, 0, 0)
ProviderIdx = IndexC(ConnectionString, 'Provider', 1)
ProviderIdx = IndexC(ConnectionString, 'Provider', 1)
If ProviderIdx then
ConnectionString = ConnectionString[(ProviderIdx + 1), 999]
ConnectionString = ConnectionString[(ProviderIdx), 999]
ProviderEndIdx = Index(ConnectionString, ';', 1)
ConnectionString = ConnectionString[(ProviderEndIdx + 1), 999]
end
ServerIdx = IndexC(ConnectionString, 'Server', 1)
If ServerIdx then
ServerLen = Len(ConnectionString[ServerIdx, 'F;'])
ConnectionString[ServerIdx, ServerLen + 1] = ''
end
InitialIdx = IndexC(ConnectionString, 'Initial File Name', 1)
If InitialIdx then
InitialLen = Len(ConnectionString[InitialIdx, 'F;'])
@ -874,6 +837,29 @@ Service GetConnectionString(Server)
If DataSourceIdx then
ConnectionString[DataSourceIdx + 12, 0] = 'tcp:'
end
TrustIdx = IndexC(ConnectionString, 'Trust Server Certificate', 1)
If TrustIdx then
TrustLen = Len(ConnectionString[TrustIdx, 'F;'])
ConnectionString[TrustIdx, TrustLen + 1] = ''
end
AccessIdx = IndexC(ConnectionString, 'Access Token', 1)
If AccessIdx then
AccessLen = Len(ConnectionString[AccessIdx, 'F;'])
ConnectionString[AccessIdx, AccessLen + 1] = ''
end
AuthIdx = IndexC(ConnectionString, 'Authentication', 1)
If AuthIdx then
AuthLen = Len(ConnectionString[AuthIdx, 'F;'])
ConnectionString[AuthIdx, AuthLen + 1] = ''
end
SpnIdx = IndexC(ConnectionString, 'Server SPN', 1)
If SpnIdx then
SpnLen = Len(ConnectionString[SpnIdx, 'F;'])
ConnectionString[SpnIdx, SpnLen + 1] = ''
end
If ConnectionString[-1, 1] EQ ';' then ConnectionString[-1, 1] = ''
end else
Error_Services('Add', Server : ' is not a valid server. [' : Service : ']')
@ -3654,5 +3640,3 @@ return