Posts: 2
Threads: 1
Joined: Oct 2009
Reputation:
0
10-13-2009, 09:21 AM
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.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
10-13-2009, 06:59 PM
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.
Posts: 2
Threads: 1
Joined: Oct 2009
Reputation:
0
10-13-2009, 10:30 PM
Hi,
If possible can you please explain little bit more on this. thanks in advance.