Reading data from a file through shell script

There is one Text file data.txt.
Data within this file looks like:

a.sql
b.sql
c.sql
d.sql
.....
.....

want to write a shell script which will access these values within a loop, access one value at a time and store into a variable. can anyone plz help me.

Check the bottom of the page on "More UNIX and Linux Forum Topics You Might Find Helpful" section first.

while read line
do
echo $line
done<data.txt

line is a variable which will have 1 value at a time.