'*************************************** *************************
'Microsoft SQL Server 2000
'Visual basic file generated for DTS package
'File name: C: \ Documents ents and Settings \ maintain \ Desktop \ processcube. Bas
'Package name: processcube
'Package description:
'Generated Date: 2004-6-11
'Generated time: 9:37:31
'*************************************** *************************
Option explicit
Public gopackageold as new DTS. Package
Public gopackage as DTS. package2
Private sub main ()
Set gopackage = gopackageold
Gopackage. Name = "processcube"
Gopackage. writecompletionstatustonteventlog = false
Gopackage. failonerror = false
Gopackage. packagepriorityclass = 2
Gopackage. maxconcurrentsteps = 4
Gopackage. lineageoptions = 0
Gopackage. usetransaction = true
GOPs ackage. transactionisolationlevel = 4096
Gopackage. autocommittransaction = true
Gopackage. repositorymetadataoptions = 0
Gopackage. useoledbservicecomponents = true
Gopackage. logtosqlserver = false
Gopackage. logserverflags = 0
Gopackage. failpackageonlogfailure = false
Gopackage. explicitglobalvariables = false
Gopackage. packagetype = 0
'---------------------------------------------------------------------------
'Create package steps Information
'---------------------------------------------------------------------------
Dim ostep as DTS. step2
Dim oprecconstraint as DTS. precedenceconstraint
'------------- A new step defined below
Set ostep = gopackage. Steps. New
Ostep. Name = "dtsstep_dtsolapprocess.task_1"
Ostep. Description = "Analysis Services processing task: undefined"
Ostep. executionstatus = 1
Ostep. taskname = "dtsolapprocess"
Ostep. commitsuccess = false
Ostep. rollbackfailure = false
Ostep. scriptlanguage = "VBScript"
Ostep. addglobalvariables = true
Ostep. relativepriority = 3
Ostep. closeconnection = false
Ostep. executeinmainthread = true
Ostep. ispackagedsorowset = false
Ostep. jointransactionifpresent = false
Ostep. disablestep = false
Ostep. failpackageonerror = false
Gopackage. Steps. Add ostep
Set ostep = nothing
'---------------------------------------------------------------------------
'Create package tasks Information
'---------------------------------------------------------------------------
'------------- Call task_sub1 for task dtsolapprocess (Analysis Services processing task: Undefined)
Call task_sub1 (gopackage)
'---------------------------------------------------------------------------
'Save or Execute Package
'---------------------------------------------------------------------------
'Gopackage. savetosqlserver "(local)", "sa ",""
Gopackage. Execute
Tracepackageerror gopackage
Gopackage. uninitialize
'To save a package instead of executing it, comment out the executing package lines above and uncomment the saving package line
Set gopackage = nothing
Set gopackageold = nothing
End sub
'-----------------------------------------------------------------------------
'error reporting using step. getexecutionerrorinfo after execution
'-----------------------------------------------------------------------
Public sub tracepackageerror (opackage as DTS. package)
dim errorcode as long
dim errorsource as string
dim errordescription as string
dim errorhelpfile as string
dim errorhelpcontext as long
dim erroridofinterfacewitherror as string
dim I as integer
For I = 1 to opackage. Steps. Count
If opackage. Steps (I). executionresult = dtsstepexecresult_failure then
Opackage. Steps (I). getexecutionerrorinfo errorcode, errorsource, errordescription ,_
Errorhelpfile, errorhelpcontext, erroridofinterfacewitherror
Msgbox opackage. Steps (I). Name & "failed" & vbcrlf & errorsource & vbcrlf & errordescription
End if
Next I
End sub
'------------- Define task_sub1 for task dtsolapprocess (Analysis Services processing task: Undefined)
Public sub task_sub1 (byval gopackage as object)
Dim otask as DTS. Task
Dim olookup as DTS. Lookup
Dim ocustomtask1 as dtsolapprocess. Task
Set otask = gopackage. Tasks. New ("dtsolapprocess. Task ")
Otask. Name = "dtsolapprocess"
Set ocustomtask1 = otask. customtask
Ocustomtask1.name = "dtsolapprocess"
Ocustomtask1.description = "Analysis Services processing task: undefined"
Ocustomtask1.treekey = "CPT-EXTDOMAIN \ foodmart 2000 \ cubefolder \ sales"
Ocustomtask1.itemtype = 4
Ocustomtask1.processoption = 0
Ocustomtask1.datasource = "foodmart"
Ocustomtask1.facttable = "sales_fact_1997 """
Ocustomtask1.incrementallyupdatedimensions = false
Gopackage. Tasks. Add otask
Set ocustomtask1 = nothing
Set otask = nothing
End sub