Test .TXT file data - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: Test .TXT file data (/Thread-Test-TXT-file-data) |
Test .TXT file data - krishna2327 - 10-13-2009 Hi, Can any one help on this scenario.. Importing data from.Txt file to Global sheet and from there compare data to Database using VB Script and SQL. RE: Test .TXT file data - basanth27 - 10-13-2009 yes. The first step maybe a bit manual(can be automated too, to trial out..). Import your .txt file into a excel sheet with the correct delimiters. 1. Datatable.Import ( Import the excel sheet on to the datatable) 2. CreateObject("ADODB.Connection") and then Recordset object - Use this to retrieve values you require from the DB using SQL queries. 3. Datatable.Value - Fetch values from Datatable. 4. If Then Else or any other appropriate logical loop to compare values fetched from DB and the values from Datatable. I have supplied the keywords and the logic of how you have to do it. Pursue further my friend... RE: Test .TXT file data - krishna2327 - 10-13-2009 Hi, If possible can you please explain little bit more on this. thanks in advance. |