Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

array declaration

Status
Not open for further replies.

bhas

Programmer
Mar 17, 2004
30
US
Is declaring an array like this correct?

Function Check_Val(ByRef arrArray)
Dim row As Integer, j As Integer
For row = LBound(arrArray) To UBound(arrArray) - 1
For j = row + 1 To UBound(arrArray)
If arrArrray(j) = arrArray(row) Then
Check_Val = arrArray(row)
Exit Function
End If
Next
Next
Check_Val = ""
End Function
 
Can you tell me where is the dictionary objects as an array.
I dont want to open file and read the file since biztalk is doing that for me.
any ideas
 
PHV posted what you needed, but instead of opening the text file and Looping through each line you want to Loop through each element of the array that BizTalk generates, so

function summary(bizTalkOutPutArray, sOutFile)

const ForReading=1, ForWriting=2
set d=createobject("scripting.dictionary")
set fso=createobject("scripting.filesystemobject")

For Each sLine In bizTalkOutputArray
if Instr(1, sLine, "accession", 1)<>0 then
a=split(sLine,",")
if d.exists(a(0)) then
d.item(a(0))=d.item(a(0)) & a(ubound(a))
else
d.add a(0), sLine
end if
end if
Next 'sLine

set oF=fso.opentextfile(sOutFile,ForWriting,true)
a=d.Items
for i=0 to d.count-1
oF.writeline a(i)
next
oF.close : set oF=nothing
set fso=nothing

end function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top