Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.9 KiB

  1. Dim lWatson
  2. Dim lArchive
  3. Dim lMiniArchive
  4. Dim lCount
  5. Dim cn
  6. Dim oOCAData
  7. Dim dDate
  8. Dim x
  9. on error resume next
  10. Set oOCAData = CreateObject("OCAData.CountDaily.1")
  11. Set cn = CreateObject("ADODB.Connection")
  12. lCount = 0
  13. lArchive = 0
  14. lWatson = 0
  15. lMiniArchive = 0
  16. With cn
  17. .ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;Pwd=ocarpts@2;User ID=ocarpts;Initial Catalog=SnapShot;Data Source=tkwucdsqla02"
  18. .CursorLocation = 2
  19. .Open
  20. End With
  21. for x =2 to 1 Step -1
  22. lWatson = oOCAData.GetFileCount(0, "\\tkofffso03\Watson\BlueScreen\", Date - x)
  23. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsa02\Ocaarchive10\", Date - x)
  24. if lArchive = 0 then
  25. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsa02\Ocaarchive9\", Date - x)
  26. end if
  27. if lArchive = 0 then
  28. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsa02\Ocaarchive8\", Date - x)
  29. end if
  30. if lArchive = 0 then
  31. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsa02\Ocaarchive6\", Date - x)
  32. end if
  33. if lArchive = 0 then
  34. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsa02\Ocaarchive5\", Date - x)
  35. end if
  36. if lArchive = 0 then
  37. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsa02\Ocaarchive4\", Date - x)
  38. end if
  39. if lArchive = 0 then
  40. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsa02\Ocaarchive3\", Date - x)
  41. end if
  42. if lArchive = 0 then
  43. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsb01\ocaarchive2\", Date - x)
  44. End If
  45. if lArchive = 0 then
  46. lArchive = oOCAData.GetFileCount(1, "\\Tkwucdfsb01\ocaarchive\", Date - x)
  47. end if
  48. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive10\", Date - x)
  49. if lMiniArchive = 0 then
  50. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive9\", Date - x)
  51. end if
  52. if lMiniArchive = 0 then
  53. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive8\", Date - x)
  54. end if
  55. if lMiniArchive = 0 then
  56. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive7\", Date - x)
  57. end if
  58. if lMiniArchive = 0 then
  59. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive6\", Date - x)
  60. end if
  61. if lMiniArchive = 0 then
  62. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive5\", Date - x)
  63. end if
  64. if lMiniArchive = 0 then
  65. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive4\", Date - x)
  66. end if
  67. if lMiniArchive = 0 then
  68. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsa02\Ocaarchive3\", Date - x)
  69. end if
  70. if lMiniArchive = 0 then
  71. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsb01\ocaarchive2\", Date - x)
  72. End If
  73. if lMiniArchive = 0 then
  74. lMiniArchive = oOCAData.GetFileMiniCount(1, "\\Tkwucdfsb01\ocaarchive\", Date - x)
  75. end if
  76. dDate = Date - x
  77. cn.Execute "SetFileCounts '" & dDate & "', " & lWatson & ", " & lArchive & ", " & lMiniArchive
  78. Next
  79. cn.Close
  80. Set cn = Nothing
  81. Set oOCAData = Nothing