|
Home > Archive > BizTalk Server General > February 2005 > BTS2002, How to manage scripting.dictionary Objects after maprun
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
BTS2002, How to manage scripting.dictionary Objects after maprun
|
|
| tomBurk 2005-02-20, 6:12 pm |
| I have a map that has several scripting dictionaries. How can i be sure that
these scripting dictionaries are set to nothing at end of maprun? Here is
sample of some objects created, but need to confirm killed:
Dim SkuByCUSTNO
Function ItemLookupCUSTNO(ConnectionIndex, pCustID, pCUSTNO)
On Error Resume Next
Dim strIndex
If IsEmpty(SkuByCUSTNO) Then
Set SkuByCUSTNO= CreateObject("Scripting.Dictionary")
Dim SQLStatment
Dim SkuInfoRS
Dim rsCount
Dim ii
SQLStatment = "SELECT cuno, aitc, item FROM Test.dbo.tiitm012540 WHERE citt
= ‘CUS’ and suno = """
Set SkuInfoRS = CreateObject("ADODB.RecordSet")
SkuInfoRS.Open SQLStatment, DBConnections(ConnectionIndex), adOpenStatic,
adLockReadOnly, adCmdText
rsCount = SkuInfoRS.RecordCount
For ii = 1 to rsCount
strIndex = Trim(CStr(SkuInfoRS("cuno"))) + Trim(CStr(SkuInfoRS("aitc")))
BaanSkuByCUSTNO.Add strIndex, Trim(CStr(SkuInfoRS("item")))
SkuInfoRS.MoveNext
Next
SkuInfoRS.ActiveConnection = Nothing
SQLStatment = Nothing
SkuInfoRS = Nothing
End If
strIndex = pCustID & pCUSTNO
ItemLookupCUSTNO = SkuByCUSTNO(strIndex)
IF ItemLookupCUSTNO > "" THEN
ELSE
ItemLookupCUSTNO = "FAIL"
END IF
End Function
tia,
Tom
| |
| tomBurk 2005-02-22, 5:50 pm |
| Is there an Unload event following the bts2002 map run where the objects can
be set to = nothing?
tia.
Tom
"tomBurk" wrote:
> I have a map that has several scripting dictionaries. How can i be sure that
> these scripting dictionaries are set to nothing at end of maprun? Here is
> sample of some objects created, but need to confirm killed:
>
> Dim SkuByCUSTNO
> Function ItemLookupCUSTNO(ConnectionIndex, pCustID, pCUSTNO)
> On Error Resume Next
> Dim strIndex
> If IsEmpty(SkuByCUSTNO) Then
> Set SkuByCUSTNO= CreateObject("Scripting.Dictionary")
> Dim SQLStatment
> Dim SkuInfoRS
> Dim rsCount
> Dim ii
> SQLStatment = "SELECT cuno, aitc, item FROM Test.dbo.tiitm012540 WHERE citt
> = ‘CUS’ and suno = """
> Set SkuInfoRS = CreateObject("ADODB.RecordSet")
> SkuInfoRS.Open SQLStatment, DBConnections(ConnectionIndex), adOpenStatic,
> adLockReadOnly, adCmdText
> rsCount = SkuInfoRS.RecordCount
> For ii = 1 to rsCount
> strIndex = Trim(CStr(SkuInfoRS("cuno"))) + Trim(CStr(SkuInfoRS("aitc")))
> BaanSkuByCUSTNO.Add strIndex, Trim(CStr(SkuInfoRS("item")))
> SkuInfoRS.MoveNext
> Next
> SkuInfoRS.ActiveConnection = Nothing
> SQLStatment = Nothing
> SkuInfoRS = Nothing
> End If
> strIndex = pCustID & pCUSTNO
> ItemLookupCUSTNO = SkuByCUSTNO(strIndex)
> IF ItemLookupCUSTNO > "" THEN
> ELSE
> ItemLookupCUSTNO = "FAIL"
> END IF
> End Function
>
> tia,
> Tom
>
|
|
|
|
|