QTP Database conenction and parameterization of the values - 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: QTP Database conenction and parameterization of the values (/Thread-QTP-Database-conenction-and-parameterization-of-the-values) |
QTP Database conenction and parameterization of the values - siri - 07-21-2008 Hi Ankur and All, I have made a connection to Access database from QTP using database query wizard with the manually option and entered the sql statement too .here are 5rows in the database and i want to fetch the values from all the rows to the data table of the qtp under only one row in QTP and run the script for 1st iteration and then 2 nd . I am able to fetch the data for 1 st row into data table but for the 2 nd one it is posting beside the 1 st one .but I need to put the 2 nd data under the same 1 st row as we parameterize the data .Can you help me You can see the attachement too .It clearly describes all the one by one procedure . RE: QTP Database conenction and parameterization of the values - gammaflare - 07-23-2008 Get the number of rows in the database and set the number in a variable. Now use a for loop, fetch the first record, put it in the datatable and increment the datatable rowcount ( set datatable(i) where i is the loop counter). the code should look something like this NoOfRows = No of rows in the table(this can be done dynamically if the table changes all the time) Code: For i = 0 to NoOfRows RE: QTP Database conenction and parameterization of the values - somisays - 07-24-2008 Dear Siri, Please Read the following post. https://www.learnqtp.com/forums/Thread-DatabaseExample I am sure it helps. RE: QTP Database conenction and parameterization of the values - siri - 07-24-2008 Hi, The example that you suggested is of MS Access but i need it for oracle database . Database is devtest RE: QTP Database conenction and parameterization of the values - siri - 07-24-2008 Hi All, One more query regarding database . Can i record the whole sscenerio of the database connection and use for loop so that ican fetch the values to the data table from the database . RE: QTP Database conenction and parameterization of the values - somisays - 07-24-2008 Dear Siri, The example is of MSaccess but the procedure is same for all the databases.Only the difference is just create a DSN for Oracle Database. The example i given is retrieves the data from database and writing to the datatable. So please read the post carefully. Thanks RE: QTP Database conenction and parameterization of the values - somisays - 07-24-2008 Dear Siri, Can you post your script here . I can not not find any attachment with your post. Thanks RE: QTP Database conenction and parameterization of the values - siri - 07-24-2008 Hi Im not able to attach any script here or any folder .If you can give me ur email id i can send RE: QTP Database conenction and parameterization of the values - siri - 07-24-2008 Code: Set Conn = CreateObject("ADODB.Connection") This is the script an error saying that the not able to connect to database .Can you tell me the format for connect string for oracle I need the sequence for the connstrng RE: QTP Database conenction and parameterization of the values - somisays - 07-24-2008 Hi, My email id is somisays@yahoo.co.uk |