Hi all I solved it.
I did something like this..
private void Form1_Load(object sender, EventArgs e)
<pre>static string dup = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DUP1 + ";Jet OLEDB:Database Password=1010101010 ";
OleDbConnection db = new OleDbConnection(dup);
and inserted the code into the button which executes the query so the File path gets update at the time executing the query.