Hello,
as ErnestoM already said it is probably a permission issue.
On the other hand I can imagine that it is an issue with the security level of your form. While in design mode of the form, go into the menu selection Tools/Form Options depending on your version of infopath, selecting the 'Security and Trust' category, deselecting the 'Automatically determine security level' option, change the radial button to 'Full Trust' and click OK. The form now can make a database connection to the database defined in the data sources. No more Access Denied when attempting to Open, Submit, or Query data...