There is a table with 4 columns and 10 rows, how to write the
script to display the first column records using qtp? can
anybody help me with script?

Answers were Sorted based on User's Feedback



There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

Answer / kishan

rcnt=Browser().Page().webTable().rowcount
ccnt=Browser().Page().webTable().columncount(2)


for i=1 to rcnt
print Browser().page().webtable().getcellData(i,1)
next

(or)

for i=1 to rcnt
set obj=Browser().page().webtable().childItem
(i,1,"webElement",0)
print obj.getROproperty("text")
next

Is This Answer Correct ?    4 Yes 0 No

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

Answer / saharsh

clumn name: Name,Studies,rank,status

namColumnname=B("),P("").webtable("").Getcelldata(1,1)
studies=B(").P("").webtable("").getcelldata(1,2)
rank=B(").P("").webtable("").getcelldata(1,3)
status=B(").P("").webtable("").getcelldata(1,4
)

Is This Answer Correct ?    2 Yes 0 No

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

Answer / prasanna

is it webtable or table in database

Is This Answer Correct ?    1 Yes 1 No

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

Answer / gnani

Hi Prasanna,
It is a webtable.
Even I want the script for both webtable and datatable.
Can any help me by sending the script?

Is This Answer Correct ?    0 Yes 0 No

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

Answer / manas

Dim Conn, rs, ListOfRecords, x
' Connect to the Microsoft Access Database by createing a
object
set conn=CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/DataBase1.mdb" ' ex: Name of DataBase is
DataBase1.mdb

' Retriving data from Access using the SQL Query
' Column_name1 - Suppose first column
' Table - Suppose Name of Table
set rs=CreateObject("ADODB.recordset")
rs.Open "Select Column_name1 from Table", conn

for each x in rs.Fields
ListOfRecords = ListOfRecords & x.Column_Name1 & vbCrLf
next

MsgBox ListOfRecords

Is This Answer Correct ?    0 Yes 0 No

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

Answer / tvs ramakrishna chowdary

Set con=createobject("adodb.connection")
Set rs=createobject("adodb.recordset")
con.provider="microsoft.jet.oledb.4.0"
Con.open"d:\db1.mdb"
rs.open "select * from cal",con
Do while not rs.EOF
msgbox rs.fields(0)'o is first column
or
msgbox rs.fields("column1_name")
rs.movenext
Loop

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How to get align property of the link on web page?

1 Answers  


pls tell me how will you write the vb script in QTP for DataDriven test from Excel sheet for multiple userid and password explain with example

6 Answers   Ordain Solutions,


Differenece betwen Project and product ? when company need project or product?

4 Answers   Accenture,


What is source control?

1 Answers  


what is the purpose of QTP?

2 Answers  






What is the parameterization? Give one example?

0 Answers  


How many ways we can parameterize data in quicktest professional?

0 Answers  


Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.

1 Answers  


how to handle the textboxes where in it should take the sum like ex:: while posting a question in this site it will for what is the result of 6+3=__ where in we have to enter manually 9 and click on submit... but how to handle these cases in qtp.. can someone plz help me out wid dis...

1 Answers  


How do you connect to database ,What is the script to connect DATA BASE?

2 Answers   Nokia,


How can we change(increase or decrease)the size of a array variable with out loosing the previous values

1 Answers   DST Global Solutions,


How to take screen shot of desktop by using vb script code or is there any method?

1 Answers  


Categories