Subversion Repositories DevTools

Rev

Rev 4214 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4214 Rev 4476
Line 64... Line 64...
64
		OraDatabase.Parameters.Remove "USER_ID"	
64
		OraDatabase.Parameters.Remove "USER_ID"	
65
 
65
 
66
        ' Create a sane path name for the output file
66
        ' Create a sane path name for the output file
67
        ' Need to use the same rules as NodesSpecRelease.wsf to allow for BOM versions with a '/' in the name
67
        ' Need to use the same rules as NodesSpecRelease.wsf to allow for BOM versions with a '/' in the name
68
        '
68
        '
69
		Dim LocalPath, ZipFile, filesys
69
		Dim LocalPath, ZipFile, filesys, eMsg, zCount
70
    	Set rsQry = OraDatabase.DbCreateDynaset( "SELECT bn.BOM_NAME, br.BRANCH_NAME, bn.BOM_NAME ||''|| b.BOM_VERSION ||'.'|| b.BOM_LIFECYCLE AS VERSION FROM BOMS B, BRANCHES BR, BOM_NAMES BN WHERE B.BOM_ID = "& Request("bom_id") &" AND B.BRANCH_ID = BR.BRANCH_ID AND B.BOM_NAME_ID = BN.BOM_NAME_ID", cint(0))
70
    	Set rsQry = OraDatabase.DbCreateDynaset( "SELECT bn.BOM_NAME, br.BRANCH_NAME, bn.BOM_NAME ||''|| b.BOM_VERSION ||'.'|| b.BOM_LIFECYCLE AS VERSION FROM BOMS B, BRANCHES BR, BOM_NAMES BN WHERE B.BOM_ID = "& Request("bom_id") &" AND B.BRANCH_ID = BR.BRANCH_ID AND B.BOM_NAME_ID = BN.BOM_NAME_ID", cint(0))
71
		LocalPath = Request.ServerVariables("APPL_PHYSICAL_PATH") &_
71
		LocalPath = Request.ServerVariables("APPL_PHYSICAL_PATH") &_
72
                    "deployment_manager\nodespecfiles\"&_
72
                    "deployment_manager\nodespecfiles\"&_
73
                    NicePath(rsQry("branch_name")) & "\" &_
73
                    NicePath(rsQry("branch_name")) & "\" &_
74
                    NicePath(rsQry("version")) & "\"&_
74
                    NicePath(rsQry("version")) & "\"&_
Line 83... Line 83...
83
		    Response.write "<br>Version: "&rsQry("version")
83
		    Response.write "<br>Version: "&rsQry("version")
84
		    Response.write "<br>"
84
		    Response.write "<br>"
85
	        generated = false
85
	        generated = false
86
        Else
86
        Else
87
		    Dim objZIPObject
87
		    Dim objZIPObject
88
    		Set objZIPObject = Server.CreateObject("aspZip.EasyZIP")
88
    		Set objZIPObject = Server.CreateObject("XStandard.Zip")
-
 
89
 
-
 
90
            If filesys.FileExists(ZipFile) Then
-
 
91
           	    filesys.DeleteFile ZipFile, TRUE
89
    	
92
            End If
-
 
93
 
90
    		objZIPObject.ZipFileName = ZipFile
94
            objZIPObject.Pack LocalPath &"\*.*", ZipFile
91
            objZIPObject.ArgsClear
95
            eMsg = objZIPObject.ErrorDescription
92
    		objZIPObject.ArgsAdd(LocalPath &"\*.*")
96
            zCount = objZIPObject.Contents(ZipFile).Count
93
    		objZIPObject.Zip
97
            'objZIPObject = Nothing
94
    	
98
    	
95
    		Response.Write "Files Zipped=" & objZIPObject.SuccessCNT & " with Error="& objZIPObject.Error		
99
    		Response.Write "Files Zipped=" & zCount 
-
 
100
            If eMsg <> "" Then
-
 
101
    		    Response.Write " with Error="& eMsg
-
 
102
            End If
-
 
103
            		
96
    		Response.write "<br>Node Spec Files Generated for: "&objAccessControl.UserEmail&"<br>"
104
    		Response.write "<br>Node Spec Files Generated for: "&objAccessControl.UserEmail&"<br>"
97
    	    If NOT filesys.FileExists ( ZipFile ) Then
105
    	    If NOT filesys.FileExists ( ZipFile ) Then
98
    		    Response.write "<br>Internal Error: File Not Found"
106
    		    Response.write "<br>Internal Error: File Not Found"
99
    		    Response.write "<br>LocalPath: " & ZipFile & "<br>"
107
    		    Response.write "<br>LocalPath: " & ZipFile & "<br>"
100
    	        generated = false
108
    	        generated = false
Line 112... Line 120...
112
    		    set myMail = nothing
120
    		    set myMail = nothing
113
            End If
121
            End If
114
        End If
122
        End If
115
		
123
		
116
		set objWSH = nothing
124
		set objWSH = nothing
117
	
-
 
118
	    Set filesys = nothing
125
	    Set filesys = nothing
119
		rsQry.Close
126
		rsQry.Close
120
		Set rsQry = nothing
127
		Set rsQry = nothing
121
	Else	
128
	Else	
122
	generated = false
129
	generated = false