1
votes

For my form I had a database sql table called DeliveryAddress. I had linked it to a combobox which had some rules to show the fields in textboxes.

That worked great.

Then I got a new updated list so I removed the table on the server and replaced it with the new one. I also called it DeliveryAddresses.

I removed the dataconnection from the form and created a new one. I changed the ruling of the combobox for the fields. Then I published the form.

Now I cannot open the published form any more. I get this error:

The query cannot be run for the following DataObject: DeliveryAddress InfoPath cannot run the specified query. [0x80040E37][Microsoft OLE DB Provider for SQL Server] Invalid object name 'dbo.DeliveryAddress'.

When I preview the form, there is no problem.

I have checked all the source files, but the name DeliveryAddress is nowhere to be found. But still, it's trying to open it somewhere, somehow.

Before I changed the name of the table, I got a simular error, it couldn't find a field that was in the original table but isn't anymore in the new one.

How can I solve this problem?

rg. Eric

1

1 Answers

1
votes

Spent hours trying to find the solution and then just after I posted the question on StackOverflow, I manage to solve it.

I realized that every time you open a new version of a form, it first loads the precious one from an earlier moment and then checks if the version is different. But because the database changed, the old version couldn't open and that is where the above error occurs.

I went to this (old) webpage and removed all the files from the infopath formcache.

As I have Win7, the path to the formcache is:

c:\users\somename\appdata\local\microsoft\infopath

Appdata is a hidden folder, so you will have to make it visible first!

I hope this will help future users with a similar problem.