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

1>How to get the browser name by writing the VBScript. 2>How did you used the GetROProperty and GetTOproperty .give real time scenario. 2>Give and real time ex for the bug having "High Severity and low priority"on banking doamin web based application.

2 Answers   Nous,


How can we check whether a particular sheet loaded (existed) or not in Data Table.

7 Answers   TCS,


write the regular expression for date format of mm/dd/yy?

10 Answers   CTS, HCL,


How many types of parameters are available in quicktest professional?

0 Answers  


anyone can explain about "Smart Identification" in QTP. what is the use of "Smart Identification" ???

1 Answers  






I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)

0 Answers  


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

0 Answers  


In QTP I have a parameter in a datatable that is a sentence. I need to take the last word from the sentence and enter it into a field in a web application. How can I setup a parameter to enter in just a portion of the parameter (last word of the sentence) instead of the entire paramater (whole sentence).

2 Answers  


How you create new action in qtp?

0 Answers  


How u call functions in QTP Function to calculate the length of characters in a word -

5 Answers  


how to post xml data from QTP scripts to any application?

0 Answers  


what is clean sweep?

0 Answers   ABB,


Categories