'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#AdditionalJar: sqljdbc4.jar
#End Region
Sub Process_Globals
Private gSql As SQL
Private pCFG As Map
End Sub
Sub AppStart (Args() As String)
pCFG.Initialize
Try
gSql.Initialize2("com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://localhost:1433;" & _
"databaseName=ResearchSanctum;","XXXXXXXXXX","YYYYYYYYYY")
Catch
Log(LastException.Message)
ExitApplication2(1)
End Try
Do While True
Try
Dim answer As Object = gSql.ExecQuerySingleResult("SystemTestOrg")
Catch
Log(LastException.Message)
End Try
If Null = answer Then
gSql.Close
ExitApplication
End If
Dim SanctumID As Int = answer
gSql.ExecNonQuery2("SystemTestOrg_01_StartUpdate ?",Array As Object(SanctumID))
gSql.ExecNonQuery2("Sanctum_Merge_Org_Import ?",Array As Object(SanctumID))
gSql.ExecNonQuery2("SystemTestOrg_03_FinishUpdate ?",Array As Object(SanctumID))
Loop
Do While True
Dim answer As Object = gSql.ExecQuerySingleResult("SystemTestPartA")
If Null = answer Then
gSql.Close
ExitApplication
End If
Dim SanctumID As Int = answer
gSql.ExecNonQuery2("SystemTestPartA_01_StartUpdate ?",Array As Object(SanctumID))
gSql.ExecNonQuery2("Sanctum_Merge_PartA_Import ?",Array As Object(SanctumID))
gSql.ExecNonQuery2("SystemTestPartA_03_FinishUpdate ?",Array As Object(SanctumID))
Loop
End Sub