jj appserv
This commit is contained in:
@@ -8,23 +8,24 @@ Public Class DatatableJob
|
||||
Public Function Execute(context As IJobExecutionContext) As Task Implements IJob.Execute
|
||||
Dim oJobData = context.MergedJobDataMap
|
||||
Dim oLogConfig As LogConfig = oJobData.Item("LogConfig")
|
||||
Dim oCronJobTitle As String = oJobData.Item("CronJobTitle")
|
||||
Dim oDetailRow As DataRow = oJobData.Item("CronJobDetails")
|
||||
Dim oMSSQL As MSSQLServer = oJobData.Item("MSSQL")
|
||||
|
||||
Dim oConnectionId As Integer = oDetailRow.Item("CON_ID")
|
||||
Dim oTitle As String = oDetailRow.Item("TITLE")
|
||||
Dim oDatatableName As String = oDetailRow.Item("DT_NAME")
|
||||
Dim oSQL As String = oDetailRow.Item("COMMAND")
|
||||
|
||||
Dim oLogger As Logger = oLogConfig.GetLogger()
|
||||
oLogger.Debug("Running Command-Job [{0}]", oTitle)
|
||||
oLogger.Debug("Datatable Name: {0}", oDatatableName)
|
||||
oLogger.Debug("Connection Id: {0}", oConnectionId)
|
||||
|
||||
Dim oConnectionString = oMSSQL.Get_ConnectionStringforID(oConnectionId)
|
||||
|
||||
Try
|
||||
Dim oCronJobTitle As String = oJobData.Item("CronJobTitle")
|
||||
Dim oDetailRow As DataRow = oJobData.Item("CronJobDetails")
|
||||
Dim oMSSQL As MSSQLServer = oJobData.Item("MSSQL")
|
||||
|
||||
Dim oConnectionId As Integer = oDetailRow.Item("CON_ID")
|
||||
Dim oTitle As String = oDetailRow.Item("TITLE")
|
||||
Dim oDatatableName As String = oDetailRow.Item("DT_NAME")
|
||||
Dim oSQL As String = oDetailRow.Item("COMMAND")
|
||||
|
||||
oLogger.Debug("Running Command-Job [{0}]", oTitle)
|
||||
oLogger.Debug("Datatable Name: {0}", oDatatableName)
|
||||
oLogger.Debug("Connection Id: {0}", oConnectionId)
|
||||
|
||||
Dim oConnectionString = oMSSQL.Get_ConnectionStringforID(oConnectionId)
|
||||
|
||||
Dim oResult = oMSSQL.GetDatatableWithConnection(oSQL, oConnectionString)
|
||||
oResult.TableName = oDatatableName
|
||||
oLogger.Debug("Result Datatable contains [{0}] rows", oResult.Rows.Count)
|
||||
|
||||
Reference in New Issue
Block a user