Hi Dan and welcome to our forum,
I could be wrong but this sounds like the often requested xpath trickery found in the following HowTo:
http://www.infopathdev.com/howto/tips/default.aspx?i=2d9c464bbf4146ae91bf66395dca34ad . If not, let me know. I'm not sure this is just a reference issue, so please respond if I am jumping to conclusions.
For the second question, it depends on how much access you have (no pun intended!). If you need greater scalability, you should be able to migrate your data and form to use SQL without a huge amount of work.
Patrick Halstead [InfoPath MVP]
InfoPathDev