"InfoPath cannot connect to a data source" when designing InfoPath form template using Data Source

A

Aunko Abdullah

Hello,

Hope someone can help me with this:

Using Microsoft Office InfoPath 2007 (12.0.4518.1014, part of
Microsoft Office Enterprise 2007). I am executing the following steps:

* Design a form template using 'Database' option, creating a new Data
Source pointing to a database in local SQL Server 2005
* Keep the default template layout (with 'New Record' and 'Run Query'
buttons)
* Drag one query field in the 'Query' layout table
* Select 'Preview' from the toolbar
* Enter a value in the query field
* Click on 'Run Query'
* Receive the following error message:

InfoPath cannot connect to a data source

To try to connect to other data sources, click "Try to connect".
To use previously used data, click "Work offline".

If I click on the 'Show Details' button, I receive the following info:

The query cannot be run for the following DataObject: My
connection
InfoPath cannot run the specified query.
InfoPath cannot connect to the data source.
Access is denied.
Access is denied.

'My Connection' is the connection name that I specified during initial
setup.


A few things to note:

* I tried this with Microsoft Access database, endin up with same
error
* InfoPath can display column information from the table selected, so
I assume it can access the database without problem
* I tried both Integrated Authentication and SQL Server
Authentication, but the behavior remained same


TIA FYH!
 
G

Geoffrey Samper

In had something simular when I tried to connect to a webservice. I changed
my Trust level of my form to FULL TRUST and then it was fixed.

Hope it helps
 
A

Aunko Abdullah

Thanks for the reply. I contacted Microsoft Support and thats how they
solved it for me too. However, they agree that the form should not
require full trust. They are working on the issue (already collected
TTT log from me).
 
J

Jay Patterson

I am having a similar problem - Infopath 2007 & Access 2003 MDB, have a
datasource but when I preview the form, I get the same error.

I cannot find anything in the UI related to Full Trust to turn on - can
someone direct me or is this a different problem when using a local access DB.

All this security applied locally really makes the design experience horrible.
 
D

databaseflunky egghead

Tools->Form Options...

under Security and Trust in the Category Pane, Uncheck "Automatically determine security level (recommended)" click the option button labeled "Full Trust".
 
M

mario chaves

thanks lot sr. at 2011.
Hello,

Hope someone can help me with this:

Using Microsoft Office InfoPath 2007 (12.0.4518.1014, part of
Microsoft Office Enterprise 2007). I am executing the following steps:

* Design a form template using 'Database' option, creating a new Data
Source pointing to a database in local SQL Server 2005
* Keep the default template layout (with 'New Record' and 'Run Query'
buttons)
* Drag one query field in the 'Query' layout table
* Select 'Preview' from the toolbar
* Enter a value in the query field
* Click on 'Run Query'
* Receive the following error message:

InfoPath cannot connect to a data source

To try to connect to other data sources, click "Try to connect".
To use previously used data, click "Work offline".

If I click on the 'Show Details' button, I receive the following info:

The query cannot be run for the following DataObject: My
connection
InfoPath cannot run the specified query.
InfoPath cannot connect to the data source.
Access is denied.
Access is denied.

'My Connection' is the connection name that I specified during initial
setup.


A few things to note:

* I tried this with Microsoft Access database, endin up with same
error
* InfoPath can display column information from the table selected, so
I assume it can access the database without problem
* I tried both Integrated Authentication and SQL Server
Authentication, but the behavior remained same


TIA FYH!
 
S

suzysoley

I found if you are using a mapped network drive to the database it will not work, use the UNC \\ServerName\ etc...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top