12-04-2009, 04:34 PM
Hi, I am new in QTP. I have to use three return values of a function. I can store one value to function name say fnGetVal = intRowNo.
In below function I have to read values from MsAccess table & store it in array arrRowVal() , total rows count in intRowNo & pass/fail value in strResult. The function is in Library part, arrRowVal is declared before starting function as Dim arrRowVal()
'-- code to read access table & store in array arrRowVal, count in intRowNo, result pass/fail in strEndResult.
End function
'===== call code
Note : I am not sure the parameter arrRowVal is correct to pass or not in fnGetVal. Getting General error if arrRowVal() is written.
The function is working fine , but how to get the values stored in intRowNo, arrRowVal() , strEndResult in call code script.
Thanks in advance.
Dinesh
In below function I have to read values from MsAccess table & store it in array arrRowVal() , total rows count in intRowNo & pass/fail value in strResult. The function is in Library part, arrRowVal is declared before starting function as Dim arrRowVal()
Code:
function fnGetVal(Sql, intRowNo, arrRowVal() , strResult)
'-- code to read access table & store in array arrRowVal, count in intRowNo, result pass/fail in strEndResult.
End function
'===== call code
Code:
strSql="Select SrNo,Name from ABCtbl where Flag = '1' "
strErrorMessage=fnGetVal(strSql, intCount, arrRowVal, strResult)
Note : I am not sure the parameter arrRowVal is correct to pass or not in fnGetVal. Getting General error if arrRowVal() is written.
The function is working fine , but how to get the values stored in intRowNo, arrRowVal() , strEndResult in call code script.
Thanks in advance.
Dinesh