User (NavneethNaik@vjil.com.nospam) posted:

Can I keep an Object Data VP inside a for Loop?
Actually i have two combo boxes in my web page.
The data in second combo box changes as and when the selection in the first
combo box changes.

To test whether the correct data is being populated in the second combo
box, i have kept the
Object Data VP(on second combo box) inside a for loop.
For while retrieving the values, the values retrieved are not proper
according to the displayed values in the combo box. Retrieved values are
different than displayed.

I am using the below function to read the object data from the file.


Function fnGetData(ScriptName as String, VPName as String, Data() as
variant)as Integer
Dim sVPPath As String
Dim sFName As String
Dim iTemp As Integer
Dim sLine As String
sVPPath = SQAGetLogDir
iTemp = 1

redim data(10)
sFName= dir(sVPPath & "vp\" & ScriptName & "." & VPName & ".act*.grd")
If sFName= "" Then sFName= dir(sVPPath & "vp\" & ScriptName & "." &
VPName & ".exp.grd")
If sFName= "" then
fnGetData = -1
Exit function
End if
open sVPPath & "vp\" & sFName for input as #1
sqaConsoleWrite "Reading from the file:" & sVPPath & "vp\" & sFName
Line Input #1, sLine
Do While Not eof(1)
if Ubound(data) = iTemp then redim preserve data(iTemp + 10)
Data(iTemp) = trim(sLine)
Line Input #1, sLine
iTemp = iTemp + 1
Loop
redim preserve data(iTemp)
Close #1
fnGetData = 0
End Function
Is there anyother way to solve the above problem.
Any help in this matter would be helpful to me.
Thanx and Regards
Navneeth Naik
(VJIL Consulting Limited)


---