I have a form that we built in InfoPath2010 and I am trying to publish it to SharePoint2010 using the "broswer-based" capability. The form works in preview mode in InfoPath, but when I publish it to SharePoint, I get the follwing error:
"You do not have permissions to access a database that contains data required for this form to function correctly.
An entry has been added to the Windows event log of the server.
The form has two main data connections, both are tables in a sql database server. They display data from the tables, and the users are also able to input data into the database. The form right now is configured as "full" trust, as we have custom
code in the form that will only work with that setting. I have also uploaded the two UDC connection to a data connection library in SharePoint, but no luck.
Here is part of the the custom code in our form that may be causing issues: