Subversion Repositories DevTools

Rev

Rev 177 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
Option Explicit
2
'=====================================================
133 ghuddy 3
'        Name:   common_subs.vbs
4
' Description:   Contains list of common subs and functions
119 ghuddy 5
'=====================================================
6
'-----------------------------------------------------------------------------------------------------------------
7
' NOTE: This is NOT USED
8
' It is here only to satisfy Application variable in asp which VBS don't know about
9
Function Application( sParam )
133 ghuddy 10
   If sParam = "TNS_NAME" Then
11
      Application = ""
12
   ElseIf sParam = "RELEASE_MANAGER_LOGIN" Then
13
      Application = ""
14
   End If
119 ghuddy 15
End Function
16
'-----------------------------------------------------------------------------------------------------------------
17
Function ReadFile( SSpath )
133 ghuddy 18
   Dim filesys, rfile
19
   Set filesys = CreateObject("Scripting.FileSystemObject")
20
 
21
   On Error Resume Next
22
   If filesys.FileExists ( SSpath ) Then
23
       Set rfile = filesys.OpenTextFile( SSpath, 1, false)
24
       ReadFile = rfile.ReadAll
25
       rfile.close
119 ghuddy 26
    Else
27
        Call Raise_Event ( enumEVENT_ERROR, "[sub:ReadFile]", _
133 ghuddy 28
                           "File: "& SSpath, _
29
                           "File not found!", enum_RELEASE_NOTES_FAILED )
119 ghuddy 30
    End If
133 ghuddy 31
 
32
   Call ErrorCheck ( "[sub:ReadFile]", NULL )
33
 
34
   Set filesys = nothing
119 ghuddy 35
End Function
36
'-----------------------------------------------------------------------------------------------------------------
37
Sub SaveFile( SSpath, SSfilename, SScontent )
133 ghuddy 38
   Dim filesys, filetxt
39
   Set filesys = CreateObject("Scripting.FileSystemObject")
40
   WScript.Echo "Saving file "& SSpath &"\"& SSfilename &" ..."
41
 
42
   On Error Resume Next
43
   Set filetxt = filesys.CreateTextFile( SSpath &"\"& SSfilename, True )
44
   filetxt.WriteLine(SScontent)
45
   filetxt.Close
46
 
47
   Call ErrorCheck ( "[sub:SaveFile]", NULL )
48
 
49
   WScript.Echo "File Saved: "& SSpath &"\"& SSfilename
50
   Set filetxt = nothing
51
   Set filesys = nothing
119 ghuddy 52
End Sub
53
'-----------------------------------------------------------------------------------------------------------------
54
Sub DeleteFile( SSpath )
133 ghuddy 55
   Dim filesys
56
   Set filesys = CreateObject("Scripting.FileSystemObject")
57
   If filesys.FileExists(SSpath) Then
58
      filesys.DeleteFile SSpath
59
   End If
60
   Set filesys = nothing
119 ghuddy 61
End Sub
62
'-----------------------------------------------------------------------------------------------------------------
63
Sub DeleteFolder( SSpath )
133 ghuddy 64
   Dim  filesys
65
   Set filesys = CreateObject ("Scripting.FileSystemObject")
66
   If filesys.FolderExists( SSpath ) Then
67
      filesys.DeleteFolder SSpath, TRUE
68
   End If
119 ghuddy 69
End Sub
70
'-----------------------------------------------------------------------------------------------------------------
71
Function Folder_Is_Empty ( sPath )
133 ghuddy 72
   Dim filesys, oFolder
73
   Set filesys = CreateObject("Scripting.FileSystemObject")
74
 
75
   If filesys.FolderExists( sPath ) Then
76
      Set oFolder = filesys.GetFolder( sPath )
77
      If ( oFolder.Files.Count + oFolder.SubFolders.Count ) > 0 Then
78
         Folder_Is_Empty = FALSE
79
      Else
80
         Folder_Is_Empty = TRUE
81
      End If
82
   Else
83
      Folder_Is_Empty = TRUE
84
   End If
85
 
119 ghuddy 86
End Function
87
'-----------------------------------------------------------------------------------------------------------------
88
Function NVL ( SSvalue )
133 ghuddy 89
   If IsNull(SSvalue) Or SSvalue = "" Then
90
      NVL = " "
91
   Else
92
      NVL = SSvalue
93
   End If
119 ghuddy 94
End Function
95
'-----------------------------------------------------------------------------------------------------------------
96
Function Format_FileName( sPkg_name, sPkg_version, nPv_id )
133 ghuddy 97
   Dim name, version
98
   name =  Replace( sPkg_name, " ", "_")
99
   version = Replace( sPkg_version, " ", "")
100
   version = Replace( version, ".", "_")
101
 
102
   Format_FileName = RELESE_NOTES_PERFIX &"_"& nPv_id &"_"& name &"_"& version &".html"
119 ghuddy 103
End Function
104
'-----------------------------------------------------------------------------------------------------------------
105
Function Get_Application_Path ()
133 ghuddy 106
   Dim tempSTR
107
   tempSTR = WScript.ScriptFullName
119 ghuddy 108
 
133 ghuddy 109
   Get_Application_Path = Left( tempSTR, InStrRev( tempSTR, "\", InStrRev( tempSTR, "\" ) -1 ) )
119 ghuddy 110
End Function
111
'-----------------------------------------------------------------------------------------------------------------
112
Sub Include_File ( SSFile )
133 ghuddy 113
   Dim myInclude
114
   myInclude = ReadFile( SSFile )
115
   myInclude = Replace ( myInclude, "<%", "" )      ' Remove ASP tags
116
   myInclude = Replace ( myInclude, "%>", "" )      ' Remove ASP tags
117
   Execute( myInclude )
119 ghuddy 118
End Sub
119
'-----------------------------------------------------------------------------------------------------------------
120
Sub CRC_cksum ( SSfile_name, outCRC, outSize )
133 ghuddy 121
   Dim sysShell, crcDump, oExec, outStdErr, outStrOut, crcARR
122
   Set sysShell = WScript.CreateObject("WScript.Shell")
123
 
124
 
125
   Set oExec = sysShell.Exec( AppPath & CKSUM_EXE &" """& SSfile_name &"""" )
126
 
127
   outStdErr = oExec.StdErr.ReadLine
128
   outStrOut = oExec.StdOut.ReadLine
129
 
130
   If outStdErr = "" Then
131
      crcDump = Trim( outStrOut )
132
      crcDump = Replace ( crcDump, VBNewLine, "" )      ' Remove newline characters
133
      While InStr( crcDump, "  ") > 0
134
         crcDump = Replace ( crcDump, "  ", " " )      ' Ensure single space between items
135
      Wend
136
 
137
      crcARR = Split ( crcDump, " " )    ' Split with space
138
      outCRC = crcARR(0)
139
      outSize = crcARR(1)
140
   Else
141
      outCRC = -1      ' Error occuerd during cksum. Can be no read permissions
142
      outSize = -1
143
   End If
144
 
145
   Set sysShell = nothing
119 ghuddy 146
End Sub
147
'-----------------------------------------------------------------------------------------------------------------
148
Sub CRC_modcrc ( SSfile_name, SSfile_path, outCRC, outSize )
133 ghuddy 149
   Dim sysShell, crcDump, oExec, outStdErr, outStrOut, crcARR
150
   Set sysShell = WScript.CreateObject("WScript.Shell")
119 ghuddy 151
 
133 ghuddy 152
   Set oExec = sysShell.Exec( AppPath & MODCRC_EXE &" -m="& SSfile_path & SSfile_name &" -i=thx" )
153
 
154
   outStdErr = oExec.StdErr.ReadLine
155
   outStrOut = oExec.StdOut.ReadLine
156
 
157
   If outStdErr = "" Then
158
      crcDump = Trim( outStrOut )
159
      crcDump = Replace ( crcDump, VBNewLine, "" )      ' Remove newline characters
160
      While InStr( crcDump, "  ") > 0
161
         crcDump = Replace ( crcDump, "  ", " " )      ' Ensure single space between items
162
      Wend
163
 
164
      crcARR = Split ( crcDump, " " )    ' Split with space
165
      outCRC = crcARR(4)
166
      outSize = crcARR(6)
167
   Else
168
      outCRC = -1      ' Error occuerd during cksum. Can be no read permissions
169
      outSize = -1
170
   End If
171
 
172
   Set sysShell = nothing
119 ghuddy 173
End Sub
174
'-----------------------------------------------------------------------------------------------------------------
175
Sub Raise_Event ( eventType, SSlocation, SSvalues, SSerror_message, sDBmsg )
133 ghuddy 176
   Dim WshShell, WshNetwork, objArgs, i, agrSTR, SSmsg
177
   Set WshShell = WScript.CreateObject("WScript.Shell")
178
   Set WshNetwork = WScript.CreateObject("WScript.Network")
179
 
180
   Set objArgs = WScript.Arguments
181
   For i = 0 to objArgs.Count - 1
182
      agrSTR = agrSTR & objArgs(i) & VBNewLine
183
   Next
184
 
185
   ' Compose Message
186
   SSmsg = _
187
   "-- Script Info  --"& VBNewLine &_
188
   "Host Name: "& WshNetwork.ComputerName & VBNewLine &_
189
   "Script Name: "& WScript.ScriptName & VBNewLine & VBNewLine &_
190
   "-- Script Parameters --"& VBNewLine &_
191
   agrSTR &_
192
   VBNewLine &_
193
   "-- Error Location --"& VBNewLine &_
194
   SSlocation & VBNewLine &_
195
   VBNewLine &_
196
   "-- Values --"& VBNewLine &_
197
   SSvalues & VBNewLine &_
198
   VBNewLine &_
199
   "-- Error Message --"& VBNewLine &_
200
   SSerror_message & VBNewLine
201
 
202
   '-- Raise this message at these places...
203
   Wscript.Echo SSmsg
204
   WshShell.LogEvent eventType, SSmsg
205
   'Call Alert_Admin ( SSmsg )
206
   '----------------------------------------
207
 
208
   Set WshShell = Nothing
209
 
210
   If Not IsNull(sDBmsg) Then Call Write_To_Release_Notes_Info ( parPv_id, sDBmsg )
211
   If eventType = enumEVENT_ERROR Then WScript.Quit    ' Only Quit if ERROR
212
 
119 ghuddy 213
End Sub
214
'-----------------------------------------------------------------------------------------------------------------
215
Sub ErrorCheck ( ERRlocation, ERRvals )
133 ghuddy 216
   If Err.Number <> 0 Then
217
      Call Raise_Event ( enumEVENT_ERROR, ERRlocation, ERRvals, Err.Source &" "& Err.Description, enum_RELEASE_NOTES_FAILED  )
218
   End If
219
   Err.Clear
119 ghuddy 220
End Sub
221
'-----------------------------------------------------------------------------------------------------------------
222
Sub Alert_Admin ( SSmsg )
133 ghuddy 223
   'Call Send_Email ( adminEmail, adminEmail, "Windows Script Alert!", SSmsg )
119 ghuddy 224
End Sub
225
'-----------------------------------------------------------------------------------------------------------------
226
Sub Send_Email ( SSfrom, SSto, SSsubject, SSbody )
133 ghuddy 227
   'Dim objCDOMail
228
   'Set objCDOMail = CreateObject("CDONTS.NewMail")
229
   ''objCDOMail.From = Request.Form("firstName") & " " & Request.Form("lastName") & " <" & strReturnEmailAddress & ">"
230
   'objCDOMail.From = SSfrom
231
   'objCDOMail.To = SSto
232
   ''objCDOMail.Cc = strCCEmailAddress
233
   ''objCDOMail.Bcc = strBCCEmailAddress
234
   'objCDOMail.Subject = SSsubject
235
   'objCDOMail.BodyFormat = 1             ' 0 = HTML, 1 = Plain
236
   'objCDOMail.MailFormat = 1             ' 0 = MIME, 1 = Text
237
   'objCDOMail.Importance = 0             ' 0 = High, 1 = Medium, 2 = Low
238
   ''objCDOMail.attachFile ("c:\images\mypicture.gif") ' you can also attach files
239
   'objCDOMail.Body = SSbody
240
   ''objCDOMail.Send
241
   'Set objCDOMail = Nothing
119 ghuddy 242
End Sub
243
'-----------------------------------------------------------------------------------------------------------------
244
Sub Get_PV_ID ( SSpkg_name, SSpkg_version, outPV_ID)
133 ghuddy 245
   Dim Query_String, rsTemp
246
 
247
   If outPV_ID <> "" Then Exit Sub      ' PV_ID already assigned
248
 
249
   Query_String = _
250
   " SELECT pv.pv_id"&_
251
   "   FROM packages pkg,"&_
252
   "        package_versions pv"&_
253
   "  WHERE pv.pkg_id = pkg.pkg_id"&_
254
   "    AND pkg.pkg_name = '"& SSpkg_name &"'"&_
255
   "    AND pv.pkg_version = '"& SSpkg_version &"'"
256
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
257
 
258
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
259
      outPV_ID = rsTemp("pv_id")
260
   Else
261
      Call Raise_Event ( enumEVENT_ERROR, "[sub:Get_PV_ID]", _
262
                         "pkg_name: "& SSpkg_name & VBNewLine &_
263
                         "pkg_version: "& SSpkg_version , _
264
                         "pkg_name and/or pkg_version not found in Release Manager database!", enum_RELEASE_NOTES_FAILED )
265
   End If
266
   rsTemp.Close
267
   Set rsTemp = Nothing
119 ghuddy 268
End Sub
269
'-----------------------------------------------------------------------------------------------------------------
270
Function Get_Package_Type ( NNpv_id )
133 ghuddy 271
   Dim Query_String, rsTemp
272
 
273
   Query_String = ReadFile( AppPath & QUERIES_FOLDER & "\package_type.sql" )
274
   OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
275
   OraDatabase.Parameters.Add "enumBASE_VIEW_PRODUCTS", enumBASE_VIEW_PRODUCTS, ORAPARM_INPUT, ORATYPE_NUMBER
276
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
277
 
278
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
279
      If Not IsNull( rsTemp("message") ) Then
280
         Get_Package_Type = Eval(rsTemp("message"))
281
      Else
282
         Get_Package_Type = enumPKG_TYPE_GENERIC_DPKG
283
      End If
284
   Else
285
      Get_Package_Type = enumPKG_TYPE_GENERIC_DPKG
286
   End If
287
 
288
   WScript.Echo "Package Type : "& Get_Package_Type
289
 
290
   OraDatabase.Parameters.Remove "PV_ID"
291
   OraDatabase.Parameters.Remove "enumBASE_VIEW_PRODUCTS"
292
   rsTemp.Close
293
   Set rsTemp = Nothing
119 ghuddy 294
End Function
295
'-----------------------------------------------------------------------------------------------------------------
296
Sub Get_Pkg_Name_Version ( NNpv_id, outPkg_name, outPkg_version )
133 ghuddy 297
   Dim Query_String, rsTemp
298
 
299
   Query_String = _
300
   " SELECT pkg.pkg_name, pv.pkg_version"&_
301
   "   FROM packages pkg,"&_
302
   "        package_versions pv"&_
303
   "  WHERE pv.pkg_id = pkg.pkg_id"&_
304
   "    AND pv.pv_id = "& NNpv_id
305
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
306
 
307
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
308
      outPkg_name = rsTemp("pkg_name")
309
      outPkg_version = rsTemp("pkg_version")
310
   Else
311
      Call Raise_Event ( enumEVENT_ERROR, "[sub:Get_Pkg_Name_Version]", _
312
                         "PV_ID: "& NNpv_id , _
313
                         "PV_ID not found in Release Manager database!", enum_RELEASE_NOTES_FAILED )
314
   End If
315
 
316
   rsTemp.Close
317
   Set rsTemp = Nothing
119 ghuddy 318
End Sub
319
'-----------------------------------------------------------------------------------------------------------------
320
Sub Check_Requirements_To_Proceed ( nPv_id )
133 ghuddy 321
   Dim Query_String, rsPackageVersions, rsRunLevel, rsReleaseConfig, rsReleaseTags
322
 
323
   ' Exit if Release Notyes Generation is forced
324
   If objArgs.Named.Item("f") <> "" Then Exit Sub
325
 
326
   Query_String = _
327
   " SELECT pv.release_notes_info, pv.pkg_id"&_
328
   " FROM package_versions pv"&_
329
   " WHERE pv.pv_id = "& nPv_id
330
 
331
   Set rsPackageVersions = OraDatabase.CreateDynaset( Query_String, cint(0))
332
 
333
   If rsPackageVersions("release_notes_info") <> enum_RELEASE_NOTES_GENERATING Then
334
      WScript.Echo "Exiting this job. release_notes_info in [PACKAGE_VERSIONS] table is ("& rsPackageVersions("release_notes_info") &")"
335
      WScript.Echo "Expected value is ("& enum_RELEASE_NOTES_GENERATING &")"
336
      Call Raise_Event ( enumEVENT_ERROR, "[sub:Check_Requirements_To_Proceed]", _
337
                         "PV_ID: "& nPv_id , _
338
                         "Exiting this job. release_notes_info in [PACKAGE_VERSIONS] table is ("& rsPackageVersions("release_notes_info") &")", NULL )
339
   End If
340
 
341
   ' Do not proceed if the build daemon is building a version of the package. This is an attempt to make sure that
342
   ' release notes generation does not cause a problem for the build daemons, such as might be the case if and when
343
   ' it manipulates file ownership later on, etc (see DEVI-48682). This is not a foolproof method to prevent the problem,
344
   ' but it should reduce the likelyhood of it occuring
345
   Dim mustAbort
346
   mustAbort = FALSE
347
 
348
   Query_String = _
349
   " SELECT * "&_
350
   "   FROM run_level rl"&_
351
   "  WHERE rl.current_pkg_id_being_built = "& rsPackageVersions("pkg_id")
352
 
353
   Set rsRunLevel = OraDatabase.CreateDynaset( Query_String, cint(0))
354
 
355
   'For each run_level table entry...
356
   Do While (NOT rsRunLevel.BOF) AND (NOT rsRunLevel.EOF) AND (mustAbort = FALSE)
357
 
358
      ' Make sure that the release configuration shows that there is a daemon hostname associated with this
359
      ' run_level table entry.
360
      Query_String = _
361
      " SELECT rtag_id, daemon_hostname"&_
362
      "   FROM release_config"&_
363
      "  WHERE rcon_id = "& rsRunLevel("rcon_id")
364
 
365
      Set rsReleaseConfig = OraDatabase.CreateDynaset( Query_String, cint(0))
366
      If (rsReleaseConfig.RecordCount > 0) AND NOT IsNull(rsReleaseConfig("daemon_hostname")) Then
367
         ' ought to check the validity of the daemon hostname - will have to wait for these to be configured metadata
368
         ' before we can do that though, unless we hard-code the valid names here somewhere.
369
         ' Anyway, the hostname is not null so it looks like the run_level entry is one we cannot dis-regard
370
 
371
         ' if the run level is ACTIVE (3) then abort
372
         If rsRunLevel("current_run_level") = 3 Then
373
            mustAbort = TRUE
374
         Else
375
            ' run level must be WAITING, PAUSED, etc, so examine the official state of the release to see if
376
            ' it is still open in some way
377
            Query_String = _
378
            " SELECT official"&_
379
            "   FROM release_tags"&_
380
            "  WHERE rtag_id = "& rsReleaseConfig("rtag_id")
381
 
382
            Set rsReleaseTags = OraDatabase.CreateDynaset( Query_String, cint(0))
383
            If (rsReleaseTags.RecordCount > 0) Then
384
               ' If release is not closed or archived
385
               If NOT (IsNull(rsReleaseTags("official")) OR (rsReleaseTags("official") = "Y") OR (rsReleaseTags("official") = "A")) Then
386
                  ' release is still open (OPEN or RESTRICTED, or CCB Mode) so abort
387
                  mustAbort = TRUE
388
               End If
389
            End If
390
            rsReleaseTags.Close
391
            Set rsReleaseTags = Nothing
392
         End If
393
      End If
394
 
395
      rsReleaseConfig.Close
396
      Set rsReleaseConfig = Nothing
397
 
398
      rsRunLevel.MoveNext
399
   Loop
400
 
401
   If (mustAbort) Then
402
      WScript.Echo "Exiting this job. Build Daemon is currently building this/another version of this package."
403
      WScript.Echo "Try again later."
404
      Call Raise_Event ( enumEVENT_ERROR, "[sub:Check_Requirements_To_Proceed]", _
405
                         "PV_ID: "& nPv_id & VBNewLine & "PKG_ID: "& rsPackageVersions("pkg_id"), _
406
                         "Exiting this job. Build Daemon is currently building this/another version of this package.", NULL )
407
   End If
408
 
409
   rsRunLevel.Close
410
   Set rsRunLevel = Nothing
411
 
412
   rsPackageVersions.Close
413
   Set rsPackageVersions = Nothing
414
 
119 ghuddy 415
End Sub
416
'-----------------------------------------------------------------------------------------------------------------
417
Sub Write_To_Release_Notes_Info ( nPv_id, sMsg )
418
    WScript.Echo "Writing message to release_notes_info in [PACKAGE_VERSIONS] table."
419
    OraSession.BeginTrans
177 brianf 420
 
421
    If IsNULL(sMsg) Then
422
      WScript.Echo "NULL"
423
      OraDatabase.ExecuteSQL " UPDATE package_versions "&_
424
                          "    SET release_notes_info = NULL"&_
425
                          "  WHERE pv_id = "& nPv_id
426
    Else
427
      WScript.Echo sMsg
428
      OraDatabase.ExecuteSQL " UPDATE package_versions "&_
133 ghuddy 429
                          "    SET release_notes_info = '"& sMsg &"'"&_
430
                          "  WHERE pv_id = "& nPv_id
177 brianf 431
    End If
119 ghuddy 432
    OraSession.CommitTrans
433
End Sub
434
'-----------------------------------------------------------------------------------------------------------------
133 ghuddy 435
Function FormatTextBox ( SSstr )
436
   If SSstr <> "" Or NOT IsNull(SSstr) Then
437
      FormatTextBox = Replace ( SSstr, VBNewLine, "<br>")
438
   End If
119 ghuddy 439
End Function
440
'-----------------------------------------------------------------------------------------------------------------
441
Function HTML_Encode ( sSTR )
442
    Dim tempSTR
443
    tempSTR = sSTR
444
    If IsNull( tempSTR ) Or tempSTR = "" Then
445
        HTML_Encode = ""
446
    Else
447
        tempSTR = Replace ( tempSTR, "&", "&amp;" )
448
        tempSTR = Replace ( tempSTR, "<", "&lt;" )
449
        tempSTR = Replace ( tempSTR, ">", "&gt;" )
450
        HTML_Encode = tempSTR
451
    End If
452
End Function
453
'-----------------------------------------------------------------------------------------------------------------------------
454
Function EuroDate ( dDate )
133 ghuddy 455
   ' Ensures Euro Date format DD/MM/YYYY
456
   If IsNull(dDate) Then Exit Function
457
   EuroDate = Day(dDate) &"/"& Month(dDate) &"/"& Year(dDate)
119 ghuddy 458
End Function
459
'-----------------------------------------------------------------------------------------------------------------------------
460
Function EuroDateTime ( dDate )
133 ghuddy 461
   ' Ensures Euro DateTime format DD/MM/YYYY H24:MIN:SS
462
   If IsNull(dDate) Then Exit Function
463
   EuroDateTime = Day(dDate) &"/"& Month(dDate) &"/"& Year(dDate) &" "& FormatDateTime( dDate, 4 )
119 ghuddy 464
End Function
161 iaugusti 465
 
133 ghuddy 466
'-----------------------------------------------------------------------------------------------------------------
161 iaugusti 467
Sub Get_Release_Info (APV_ID, ByRef ARTAG_ID, ByRef APKG_ID)
468
   Dim Query_String, rsTemp
469
 
470
   Query_String = _
471
   " SELECT rc.rtag_id, pv.pkg_id"&_
472
   " FROM package_versions pv, release_content rc"&_
473
   " WHERE rc.pv_id = " & APV_ID &_
474
   " AND pv.pv_id = rc.pv_id"
475
 
476
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
477
 
478
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
479
      ARTAG_ID = rsTemp("rtag_id")
480
      APKG_ID = rsTemp("pkg_id")
481
   Else
482
      Call Raise_Event ( enumEVENT_ERROR, "[sub:Get_Release_Info]", _
483
                         "PV_ID: "& APV_ID & VBNewLine ,_
484
                         "pv_id not found in release_content table!", enum_RELEASE_NOTES_FAILED )
485
   End If
486
   rsTemp.Close
487
   Set rsTemp = Nothing
488
End Sub