in a database table there are 3 columns (name ,
marks,grade) , in application after retrieving data from
db to fields name, marks click ok button then grade should
displayed ---for this how to write vb script prgm

Answers were Sorted based on User's Feedback



in a database table there are 3 columns (name , marks,grade) , in application after retrieving da..

Answer / baba fakruddin

Let us assume that application is VB application
You can copy and paste in ur PC then analyze u will
understand easily

E.g:

RC=datatable.GetRowCount
msgbox RC

For i= 1 to RC

vbwindow("Form1").vbedit("name").Set DataTable("Name",
dtGlobalSheet)
vbwindow("Form1").vbedit("marks").Set
DataTable("Marks",dtGlobalSheet)
vbwindow("Form1").vbbutton("OK").Click

' Here it will retrieve grade and displays in msgbox
grade=vbwindow("Form1").vbedit("Grade").GetROProperty("text")
msgbox grade

' It places Grade in Run Time Data Table
VbWindow("Form1").VbEdit("Grade").Output CheckPoint("Grade")

' Now we can export that data in to our desired location
Next

Is This Answer Correct ?    3 Yes 0 No

in a database table there are 3 columns (name , marks,grade) , in application after retrieving da..

Answer / kk

I feel, I could not understand your question.
I am not sure this syntax is correct, better to check it.
i=Browser().Page().WebTable().RowCount()

For x=1 to i
myData = Browser.page.WebTable().GetCellData(x,2)
'Assume, 2 is the number of Name Column.
allData=myData
'Use different Logic
Next
You can get all the data in those 3 columns.

The last part in your question is not understandable for me.

Is This Answer Correct ?    0 Yes 0 No

in a database table there are 3 columns (name , marks,grade) , in application after retrieving da..

Answer / kk

allData should be declared Globally, outside of any
Loop/Condition.

allData=myData
I am sorry, correction for the above line.
allData=allData & vbcrlf & allData

I would like to know people feed back, about this posting.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

how do we add a new sheet to data table in QTP?

7 Answers   TCS, Wipro,


Explain about Table and DB Checkpoints?

1 Answers   Crea,


Is it possible to switch between recording modes during a test creation?

0 Answers  


what is risks of testing a project?

5 Answers   AppLabs,


What will be the test script in QTP to test a ComboBox where a user has to select more than two items????

8 Answers   L&T,






How Does Run time data (Parameterization) is handled in QTP?

2 Answers   Crea,


I want to see all the properties of agent name in login window. I will use the script Set a=Window("FR").WinEdit("Agent Name:").Gettoproperties( ) msgbox but my question is how to use the msgbox if i use a it will display only a, so anyone pls let me know how to get the display of all the properties using GetToProperties () or GetRoProperties (). Thanks a lot

5 Answers  


Where u will use output checkpoint in QTP?

3 Answers   HCL,


What is parameterization? What is syncronization pt.?

3 Answers   Semantic Space, SRM,


When testing a web application, the url for each page changes, so using QTP how do u handle this scenario. If anyone knows please answer in detail about the whole procedure. Thanks a lot.

3 Answers  


can u please explain what is the exact difference between qtp8.2 and 9.0

0 Answers  


Can we do server automation by QTP? If you have any helpful links ,pls post it. Thanks Uma

1 Answers  


Categories