when trying to retrieve multiple values from database in qtp, it is not returning any values even after connection is established.
♥ 0 |
i am trying to retrieve multiple values from database and save it in datatable. it is not returning any values .
Marked as spam
|
Private answer
You have to get a recordset out of the database and iterate through it to enter the values into the datatable. This page (Using Database Functions (microfocus.com)) has some good examples on it for a variety of things. The last one on the list “Function represent_values_of_RecordSet( myrs)” can be modified to insert the data into the DataTable instead of reporting it as they do in this function. You would use the other functions on that page to connect to the DB (db_connect) and get the recordset (db_execute_query). Don’t forget to dismiss your objects and disconnect from the database. Marked as spam
|
|||
Private answer
Post a copy of your query code. Are you absolutely sure your query is finding data? Have you tested the query through another interface? What version of the product are you using? Marked as spam
|
|||
Private answer
hi, I have installed oracle client 11g in my machine. Marked as spam
|
|||
Private answer
I am using below code:- If err.number <> 0 Then result= ''Null'' FetchValue_DataSource_AllValue_DataTable = result If oRes.State = 1 Then oRes.Close Set oRes = Nothing On Error Goto 0 End Function Marked as spam
|