Incorrect Number of Rows returned from Local Datatable - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Incorrect Number of Rows returned from Local Datatable (/Thread-Incorrect-Number-of-Rows-returned-from-Local-Datatable) |
Incorrect Number of Rows returned from Local Datatable - VREntropy - 06-12-2009 I am trying to loop just through the rows that have data in the local data table but the test keeps trying to run through all 65535 rows in the table. The code to grab the number: Code: Dim i, numRows, dtDepL, dtDepG which sets the numRows variable to the 65535 instead of the three that should be set since the data table looks like: Any Ideas? Is this a bug in the system? (By the way, when I set the action run properties to run all rows it does the same thing. Tries to run through all 64k rows.) Thanks, Don RE: Incorrect Number of Rows returned from Local Datatable - VREntropy - 06-16-2009 To add to this, I DID import the local data sheet after modifying it in excel. Maybe this flags QTPro to think that the sheet is filled with data instead of actually checking for data in the cells. Don RE: Incorrect Number of Rows returned from Local Datatable - basanth27 - 07-03-2009 Is your local Datasheet a import of any excel sheet ?? if that is the case then the rows in the excel maybe sometimes interpreted as rows with data if you had created the excel using a save as option. If the entries are directly on the Datatable sheet then you may need to delete the test and open a new test and try again. RE: Incorrect Number of Rows returned from Local Datatable - sreekanth chilam - 07-03-2009 Hi , try with the below : Code: Numrows=Datatable.getsheet("LocalSheetname").Getrowcount Note: Make sure that the following is done File-->settings-->Run Tab , choose "Run only One iteration" RE: Incorrect Number of Rows returned from Local Datatable - basanth27 - 07-03-2009 Select all the rows from the row below where your data begins, right click and click on delete. Save the excel and import it back and lets see what happens. |