Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with retieving the data from the datatable
#1
Not Solved
Hi,
Code:
Set oShell = CreateObject("WScript.Shell")
sCurrDir=oShell.CurrentDirectory
pCurrpath=Split(sCurrDir,"\")
For i=0 to ubound(pCurrpath)-2
    sCurrentPath=sCurrentPath & pCurrpath(i) &"\"
Next
'####import the data File
InputXls=sCurrentPath &"\Data\Icentral.xls"
Datatable.AddSheet("Icentral")
Datatable.ImportSheet ""&InputXls&"","Icentral","Icentral"
Public oSheetName
    oSheetName="Icentral"
x=Datatable.GetSheet("Icentral").getrowcount
For row=4 to x
pszListDataTableNames="N_NullUserLogin,N_InvalidUserLogin,N_InvalidpassLogin,N_NullUserLogin,N_ValidUserLogin"
      pszListDataTableNames=split(szListDataTableNames,",")
    For a= 0 to ubound(pszListDataTableNames)
    If   (pszListDataTableNames(a)=datatable.Value("Scenario_name",oSheetName)) then
       x=Datatable.GetSheet("Icentral").getrowcount
       datatable.SetCurrentRow(row)
eporter.ReportEvent micDone,"------------End of Scenario------------",row
    End If

    Next
    datatable.SetNextRow
Next


I am using the above code, even though i am starting tthe iteration from 4, it does not stop the iteration, it goes on execution again iteration 4.
my script should exit as there are only 4 iterations to be run, and its staring from 4th one.

Any help will be really appreciated

Regards;
vijay
Reply
#2
Not Solved
Hi,
Please check your driver script setting. It must be "Run on All Iterations" .... (By Default.) .Change it to "Run one iteration".
Reply
#3
Not Solved
[quote='manabh' pid='10017' dateline='1264426649']
Hi,

the settings are fine, i want to exit the for loop specified, as soon as it finishes the iteration.
The no of datatable rows are 4
specified iteration to start from 4
the problem over here is its repeating the same iteration, it should exit the for loop.

Any help will be really appreciated.
Regards;
vijay
Reply
#4
Not Solved
Hi ,

I assume Run Settings are fine and suggest you to try as given below.

Code:
x=Datatable.GetSheet("Icentral").getrowcount
   For row=4 to x
   Datatable.GetSheet("Icentral").SetCurrentRow(row)
pszListDataTableNames="N_NullUserLogin,N_InvalidUserLogin,N_InvalidpassLogin,N_NullUserLogin,N_ValidUse​rLogin"
pszListDataTableNames=split(szListDataTableNames,",")
For a= 0 to ubound(pszListDataTableNames)
If (pszListDataTableNames(a)=datatable.Value("Scenario_name",oSheetName)) then
x=Datatable.GetSheet("Icentral").getrowcount
datatable.SetCurrentRow(row)
eporter.ReportEvent micDone,"------------End of Scenario------------",row
End If
Next
Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem to set a data into a JavaEdit field bwillems 1 4,173 12-02-2010, 02:59 PM
Last Post: bwillems
  how to store data in datatable from other application? vimal singh 2 4,034 07-16-2010, 11:24 AM
Last Post: vimal singh
  problem with retieving the data from the webtable vijay44 2 3,144 05-25-2010, 12:43 PM
Last Post: jojiraj
  Storing the dynamic data to datatable nire 3 3,013 12-10-2009, 10:31 AM
Last Post: Saket
  data transfer across sheets of datatable ajay.r1982 1 2,303 07-02-2009, 09:46 PM
Last Post: desimunda

Forum Jump:


Users browsing this thread: 2 Guest(s)