You just need to get the value for the Name field from your secondary data connection (looks like the name is "DBConnection"?) and set the value of the field you want to have the result in.
So, you need the XPath to the field in the secondary data connection (right click on it in the Fields task pane in InfoPath and select "copy XPath"), then get the value of it:
XPathNavigator nameField = this.DataSources["DBConnection"].CreateNavigator().SelectSingleNode("YourXPathHere", NamespaceManager);
if (null != nameField)
{
elemYourTextBox2.SetValue(nameField.Value);
}