Hi friend
I have query regarding QTP datatable.
I want to insert data in datatable during runtime.

suppose i wrote

datatble.value(1) = "Test data"

so when i run the script it says column(1) doesn't exist.

Then i write something in column A1 manualy and run the
script again.

Now it works fine.

Pls clarify how i can put value in blank cell of datatable.

Answers were Sorted based on User's Feedback



Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / arun singh

first of all u have to change the column name.
i.e., double click on A and run the program.

got it.

Is This Answer Correct ?    10 Yes 3 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / rajaputra

Hi,
USE THIS,

datatable.getsheet(1).addparameter"Test",""
datatable(1,1)="Test Data"

Run and see the runtime datatable

Is This Answer Correct ?    7 Yes 2 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / medena

DataTable.GetSheet(1).AddParameter "Test",""
datatable(3,1)="Data Test1"
DataTable.SetNextRow
DataTable(3,1)="Data Test2"

Is This Answer Correct ?    7 Yes 2 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / medena

I use this to fill the column with some values

Is This Answer Correct ?    4 Yes 1 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / sameer

=======
DataTable(ParameterID [, SheetID]) =NewValue This is what
is specified in data table help.

That means you should use:

DataTable.SetCurrentRow(1)
DataTable(1,dtGlobalSheet) = "Test" ...If you are to insert
data in the first row and first column of global sheet.

I am using the same...n it's working..

Is This Answer Correct ?    4 Yes 1 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / prashanth

Hi Friend,

Try this...

In the Datatable, in the first row, first column u can
find "A". DoubleClick on "A" and give any name like..."Test"

Now, in the Active Screen...

DataTable.Value("Test", Global)="Test data"

'Now if you want to use the value present in the datable,
in the script...

K=DataTable.Value("Test", Global)

Now, the value "Test Data" is stored in the variable "K"


Thanks,
Prashanth
prashanth.vikey@gmail.com

Is This Answer Correct ?    4 Yes 1 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / mercy

try putting datatable.value(2.1)="Test data". I have the
same prob...trying to resolve this the same way. will let u
know once done.

Is This Answer Correct ?    3 Yes 2 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / rajasekaran

By using Ouput Values concept we can insert in datatable
during runtime. but we can see the value only in Test
result,select runtime table in left side of he test results

Is This Answer Correct ?    2 Yes 2 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / sekhar

Hi friends,when we need to insert the values in to datatable
we can write script like

datatable("column name",sheetid)=value

Then the given value will be stored in desired sheet and
given column,

Is This Answer Correct ?    0 Yes 0 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / siraj

Before inserting value in the cell, first we need to create
column by using "addparameter" then we can insert value in
that column.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

Hi All, How to Compare two strings character by character in QTP

0 Answers  


In QTP whether is it possible to call a function from one action to another action?

1 Answers  


What are the types of properties that quick test learns while recording?

0 Answers  


What is the Difference between test object and run time object?

0 Answers  


How to add multiple values in rows, under a single column of a run time datatable?

3 Answers   NIIT,






What is the need and applications of learning VB script for a automation(QTP) engineer ain Realtime ?

1 Answers  


Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance

0 Answers  


Write Descriptiv prg 4 login logn....txt bx password---txt bx ok---btn

2 Answers   Hewitt,


hai friends i already ask this question but when i post the question the alignment goes wrong .....my question is we have a WEB TABLE ....assume that web table having 3 row's and 3 column here in 2nd row 3rd column having VISIT FACEBOOK link...now i want to check the VISIT FACEBOOK link is available or not ..if it's there i want to click the link ...then how to find the web table row or column count ....don't write the excel or data table script here friends .....consider that it's a WEB TABLE do a favour ...thank's

3 Answers  


How to add a runtime parameter to a datasheet?

1 Answers   Crea,


1) How will you associate SOR in Runtime? ( u had written 10 lines of code from 11th line u want associate what code u will write) 2) How will close n number of browser expect only one which is has to test? ( First tell me how will you identify how many browser are opened ) what logic u will use? 3) In web Table u want to click on link ( Link Name Mohamed ) you dont know in which row and column that link is there. how wil u identify and click on that link.

2 Answers  


how to check URL using QTP? write vb script with descriptive programm only?

1 Answers   Syntel,


Categories