Unable to connect to Data source through Infopath
I have Microsoft Office InfoPath 2007, i have tried number of thing to solve this problem, and to do that i followed these following steps :
When I opened an application to design a form template using 'Database' option, creating a new Data Source pointing to a database in local SQL Server 2005, i keep the default template layout, as i have read in the blog I run the Drag one query field in the 'Query' layout table then have selected Select 'Preview' from the toolbar by entering the valued in the query field i received the following error message:
InfoPath cannot connect to a data source
when i again try to connect it to the data source it prompt me saying "Try to connect". To use previously used data, click "Work offline".
Re: Unable to connect to Data source through Infopath
check your SQL database permissions against what login you are using for SharePoint. I changed my Trust level of my form to FULL TRUST and then it was fixed. You need a group account or indivdual access with at least select/read access to the database tables. First to check is the View_DowntimeAlertForm.If the above is the situation then open up the Data Sources window (Tools – Data Connections) and make sure that the data connection is set up properly and the data source is in place, working and serves requests.
Re: Unable to connect to Data source through Infopath
If the above error is shown when user does some action like clicking on button, then you need to check the Rules in the properties of that control (button) and then again need to ensure for those data sources/connections.Go to Tools->Form Options,under Security and Trust in the Category Pane, Uncheck "Automatically determine security level (recommended)" click the option button labeled "Full Trust". The infopath form is trying to talk to a service which is hosted in a different domain and it can’t trust it. What is the trust level of the form you maintained in your Data source.
Tools -> form options-> Security and Trust
I would assume you have setup using Windows Authentication on the connection to SQL.
Re: Unable to connect to Data source through Infopath
Right click on the Webservice folder(Where U ve published i.e. Under Virtual Dir)-->Propertie-->Security-->Add Everyone and Give Only Read Access.The infopath form is trying to talk to a service which is hosted in a different domain and it can’t trust it. So that Everyone can access the Datasource, which your Web service is producing.The only way to go is setting the security and trust to ‘Domain’ and converting the existing data connections or just the cross domain connections to Universal Data Connection (UDC) format.