How to use Array of Array in QTP - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: How to use Array of Array in QTP (/Thread-How-to-use-Array-of-Array-in-QTP) |
How to use Array of Array in QTP - dineshb - 12-08-2009 Hi, I am new in QTP. In MsAccess table , Column Name & data of each coulmn present. Eg. SrNo = 1, Name = Test etc.. How to use array of array to get column name & value . Here is a code I have written. Code: Dim arrRowVal() , arrColName() **Here is problem : Displayed following error Type mismatch: 'SrNo' Function file: C:\DF.qfl Line (152): " arrRowVal( arrColName(intColumn))= strColumnValue". Please let me know how to solve the problem. Thanks in Advance. Dinesh RE: How to use Array of Array in QTP - rdemers25 - 12-12-2009 First of all to save some time not sure how much. instead of Code: For intColumn = 0 To FieldsCount I would do Code: ReDim arrColName(FieldsCount) Second have arrColName(intColumn) as a string instead of a number. So if I knew this was a number this is what I suggest doing, though I'm really not sure what you are trying to accomplish. Note, if this value happens to not be a number this will still fail. Code: arrRowVal( CInt(arrColName(intColumn)))= strColumnValue |