If the text file contains queries each on a line of their own then you could loop through the file line by line and execute the query that is on each line.
i have backup database file in text file format, which includes all tables, views etc which are included on one database. I have to restore those text file data into running same database on SQL Server using VB.NET.