If I understand your issue correctly this is happening because you are not storing the values from the secondary data source in the main data source. Data you retrivew with the secondary data source (2DS) is not kept in the form so typically people will get data with the 2DS and then copy what they need into the main data source. Once it's in the main data source the data is in the XML file associated with that form.
Also, it sounds like you have a SQL bound form which can be tricky to work with. We typically suggest people don't use SQL bound forms because it makes modifying your form harder as you need to modify your DB first and then make the changes in the form.
Patrick has a blog about gaps when using SQL bound forms, it is at the bottom of this link here: http://www.infopathdev.com/blogs/patrick/archive/2010/01/29/infopath-gaps-in-sharepoint-and-sql.aspx
We suggest working with a web service like DBXL (http://www.qdabra.com/en/products/DBXL.aspx) when working with SQL. It really can make things much easier to manage and maintain in the long run.
Ted