Hi - you can add a query connection to a SQL table. But InfoPath doesn't have any built in support to pass in form values to indicate what data you want from the table. When you say SQL is returning only the first row in the DB - what is the behavior you are seeing? I have a feeling that you might be using a formula to return data from your secondary data connection that doesn't include a filter, thus you are always seeing the first value. I sometimes just open up the data source task pane (fields pane in IP 2010) and drag the data fields onto my form and preview, so I can see what data is being returned - you may want to do that. A web search for filter InfoPath secondary data source should turn up some helpful tutorials as well.
EDIT - wow - I'm sort of incoherent today. What I am trying to say is that I think you probably set up your data connection to return all rows from the table - that is all IP offers out of the box for a SQL / Access DB. And then you'll need to add a filter when you select a value from that secondary data source to make sure you get data from the right row - for example, that commonkey in the main data source = commonkey in the secondary data source.