Jimmie,

Replace your below lines of code:
Do while Not adorecordset.EOF
DataTable.SetCurrentRow(i)

, with this one :
Do while Not adorecordset.EOF
DataTable.GetSheet(outsheet.name).SetCurrentRow(i)

Thanks,
Mukesh

On Sat, Jan 22, 2011 at 1:59 AM, Jimmie Parson <[email protected]> wrote:

> To all,
>
> I need to know if it is possible to use data from the runtime data
> sheet in its current test?
>
> The example is as follows:
>
> 1. A new sheet is created in runtime datasheet with a script and
> called "output".
>
> 2. The script takes the columns names and inserts them as the "output"
> parameters.
>
> 3. I want to use the values in the "output" sheet in the test. I have
> tried all the ways I can find that reference the global and local
> datasheets but have not found anyway to use the data from the created
> sheet "output"
>
> I will include the code I am using to retrieve the data for the
> runtime datatable.
>
> Dim adocon,adorecordset
> Set adocon=CreateObject("ADODB.Connection")
> constr="Provider=OraOLEDB.Oracle.1;Password=XXXX;Persist Security
> Info=True;User ID=XXXX;Data Source=Dev"
> adocon.Open constr
> Set adorecordset=CreateObject("ADODB.Recordset")
> Set adorecordset.ActiveConnection=adocon
> Strsql="Select 'TEST PRICE LIST:' || to_char(sysdate,' MM-DD-YY
> HH:MM:SS') as PRICE_LST_NAME from Dual"
> adorecordset.Source=Strsql
> adorecordset.Open
> set outsheet=Datatable.Addsheet("output")
> For each fld in adoRecordset.Fields
>        outsheet.AddParameter fld.name,""
> Next
> i=1
> Do while Not adorecordset.EOF
> DataTable.SetCurrentRow(i)
> For each fld in adorecordset.Fields
> outsheet.GetParameter(fld.name).value=fld.value
> Next
> adorecordset.MoveNext
> i=i+1
> Loop
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<mercuryqtp%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en




-- 
Mukesh Takhtani

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to