Yes, you can do this. For a browser-enabled form you will need to
create a webservice to be the middle man between the InfoPath form and
the database. I'm not sure if I asked you this before - but do you have
any programming experience? I used the following to teach myself how to
create a webservice for my InfoPath ...