Hi All,
I have used FileQueryConnection for update the data connection withing code behind in InfoPath 2007.
FileQueryConnection dataConnection = (FileQueryConnection)DataConnections["DataConnectionFileName"];
dataConnection.FileLocation = GetFileLocation(); // Get and set the file location for update the data ...