Powerbuilder DataWindow table GetCellData
Question ID: 104506
1
0

I am currently working with Sybase’s powerbuilder for a client’s application. For the script that I am writing, it is a semi-standalone application. Also, I am validating that a report that has been generated will be the same after the report has aged. The first nine iterations work properly. They do not generate excessively large amounts of data. The last script generates a report with no less than 44 columns and over 56 thousand rows. When using either standard checkpoints or the GetCellData method, the script will either ignore the script commands or freeze up QTP. How can I address this problem?

Marked as spam
Posted by (Questions: 5, Answers: 6)
Asked on April 20, 2012 2:36 pm
225 views
Answers (2)
0
Private answer

It has been found much easier to use the following line of code to get the text-based data from a datatable by using the following line of code where objTable is the table in question:

Data = objTable.Describe(''datawindow.data'')

Marked as spam
Posted by (Questions: 5, Answers: 6)
Answered on April 24, 2012 11:27 am
0
See http://eyeontesting.com/questions/1341/pbdatawindow-data-using-qtp/1346 for more details.
( at April 24, 2012 11:40 am)
0
Private answer

When dealing with a datawindow that has that amount of data, QTP will still crash if you try to dump all of the data into a variable. Your best bet is currently found to use the following code to grab each cell 1 by 1.

For r = 0 to RowCount
For c = 0 to ColCount
SomeArray(r, c) = objDataWindow.Describe(''Evaluate('LookUpDisplay(#'' & c & '')', '' & r & '')'')
Next
Next

This will take a long time to run, but it will get the job done.

Cheers.

Marked as spam
Posted by (Questions: 5, Answers: 6)
Answered on April 26, 2012 2:07 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top