Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test .TXT file data
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
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.
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
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...
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

If possible can you please explain little bit more on this. thanks in advance.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Attaching Data source to UFT API test kul20 1 2,086 07-15-2018, 06:11 PM
Last Post: Ankur
  Comparing data from xml file and a value in gui object using UFT Lavanya N 1 2,380 07-21-2015, 03:24 PM
Last Post: Lavanya N
  How to find the latest modified file in QC11 current test attachment using QTP10 shiv.cse 0 1,879 07-23-2013, 01:25 AM
Last Post: shiv.cse
  Can User Defined Function be Written in .txt file? nomankhanhyd 2 3,205 05-14-2013, 03:20 PM
Last Post: vinod123
  QTP script to save the generated .csv file and excel file priya elangovan 0 4,405 08-29-2012, 04:17 PM
Last Post: priya elangovan

Forum Jump:


Users browsing this thread: 1 Guest(s)