InfoPath cannot run the specified query - infopath2010

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

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.

Related

Excel says a file is locked by 'another user' and removes macro when opening

I was hoping someone could kindly help me with this issue. I have never faced this before and I am not able to solve it.
We have an Excel file on the network, that up to 10 people daily use, with Excel 365. The file contains a macro that connect to SAP. Until 3 weeks ago, everything was ok, and has been ok for over 6 years.
Now, we hired a new team member, who was given a new PC.
When our new team member tries to open the file on her new machine, there is first a message mentioning there is a problem with the file and proposing to try to recover as much as we can (see picture 1).
Then when she chooses "Yes", she gets another error message mentioning that the file is locked by 'another user'. Oddly enough, it says 'another user', and not the name of that user, and we tested and are 100% nobody else is using the file.
If she then select "Notify" or "Read only", another message pops up, info message from SAP Analysis for Windows.
Finally after she clicks 'OK', the file gets finally opened, but all macro are removed from it. There is a message about the repair:
The log file is added at the end of this post.
We don't understand where the issue exactly is, this is what we tested:
the same new users recently hired can use the file with the macro without any issue on another machine
users that could use the file on their machine, can't on the new machine of our new colleague (for the test, they log in with their own credentials)
other macro files can be opened without any problem on the computer of our new colleague
we have fully reinstalled the computer, and still it bugs...
Log message:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error242560_01.xml</logFileName><summary>Errors were detected in file 'S:\MyDistriplus\DI SAP OPERATIONS\Création articles\Templates Création\TEst (2).xlsm'</summary><removedParts><removedPart>Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))</removedPart></removedParts></recoveryLog>
The problem is with the machine (the new computer).
Although you've performed a clean installation (reinstalled), you probably installed the same (probably corrupted) version of Windows and Office.
Try to open OneDrive and change this setting:
Try to install the same version of Windows and Office that's installed on the rest of the computers.
Note: Make sure to include all needed apps, addons, and files to the problematic device.
I had a similar issue, although not the locked by another user dialog. Losing the VBA made no sense to me. It turned out my issue was from duplicating a sheet in VBA that contained an image.
I think I was creating a duplicate ListObject entry for the picture, which would crash excel. My solution was to duplicate the image separately.
If your code is duplicating sheets, try removing any ListObjects and see if the problem persists.

MS Access Error: "External table not in the expected format" when trying to open linked table which previously worked

I have some queries in my Access database which pull data from Excel files that appear in the database as linked tables. They have worked just fine, until suddenly and inexplicably I was getting the error "External table is not in the expected format," when trying to access them.
I thought it might have to do with the fact that I was using a macro-enabled workbook, but it was fine before. I do have a mail merge set up in Word which is linked to the database, and using one of the aforementioned queries.
It turns out that the issue was due to the mail merge document. Once I saved and closed the mail merge file in Word and tried accessing the queries and tables again in Access, the error was no longer appearing.
It seems that if a Word mail merge is connected to the database, this error may appear. I am not sure as to why a more appropriate error is not appearing; after testing it seems to happen regardless of whether the linked file is a macro-enabled workbook or not.
In short, as Olivier put it, the file was locked by Word. A simple issue, but not exactly clear given the error message (unless you follow Andre's logic that the expected format is a non-locked file, hahah).
I hope this helps someone else!
My form is hooked to a query. The "not in expected format" message happens when the query is set up as a "snapshot". When I changed to "dynaset", the form started to work as expected.

VS 2012 EF Designer View not updating Designer

I am having a weird issue that seemed to come out of nowhere with Entity Framework v5 in Visual Studio 2012.
Today, I went to updated my model from my DB, because I added a new row column to a table. After updating it I saw the new column in the view, but when trying to reference it in the code I got errors. Turns out, the view was updated, but the Designer.cs class was not (I recreated the model). I tried this two more times and could not get the designer class to update.
I assumed it was an issue with the .edml file so I deleted it and recreated it. Now I am noticing that any changes I make in the view will not be reflected in the designer. I can change the namespace, tables, ect. and they will change in the view and the view only. I already re-added my references, but no luck. I am also getting connection issues now (which I am assuming are related to nothing but the view updating).
Has anyone else encountered this issue? I could always just go and edit the code on my own, but it is time consuming and less than ideal.
You should save the model (Ctrl+S or the Save button in Visual Studio) to regenerate the *.Designer.cs file (and other model files) after the model is changed.

TFS2010: Opening certain Excel reports gives error TF80076

When I try and open certain TFS2010 Excel reports I get the following error popup from Excel:
TF80076: The data in the work item is
not valid or you do not have
permissions to modify the data. Please
correct the problem and retry.
This is then followed by the popup:
TF208103: The initialization of the
workbook to connect to Team Foundation
Server was not successful. THe
workbook will close.... etc. etc..
... and Excel closes.
The reports that throw this error include:
Documents -> Samples and Templates ->
Project Management -> Document
Template - Iteration Backlog.xlsm (in
fact all reports in this directory
fail)
Documents -> Shared Documents ->
Iteration 1 -> Issues.xlsx (and all
reports in this directory also fail)
I believe that the error may be misleading as this only happens under one project collection and this is a project collection I had some trouble setting up so it was recreated a couple of times. I suspect that the SharePoint site that hosts the reports has got out of sync with the project collection.
Any ideas how to fix these errors?
Is there a way to regenerate the reports that error on the SharePoint site so that they can rebind with the project?
Thanks!
At the time the Team Project is generated those Excel sheets are also generated, pointing to "Iteration 1" Iteration (found at right-clicking Team Project, then "Team Project Settings">"Areas and Iterations...") & also referring to Work Item - Team Query "Iteration 1\Iteration Backlog".
If you managed to edit/delete those two, the Excel functionality shall be broken. Try to restore those back & the Excel shall work again. Then go to Excel Ribbon "Team" and choose "Configure\List" & set a valid query, pointing to a valid Iteration within your Team Project.
You can now delete the query, as well as the Team Project Iteration.
I had found this resolution here - (it's in German) & it was a lifesaver
There is also another route to possible success, taken partially from here:
Open Visual Studio, choose Team -> Team Project Collection Settings -> Process Template Manager. You can download the MSF 5 template to a folder on your hard drive. Then navigate to
FOLDER YOU DOWNLOADED TO\MSF for Agile Software Development v5.0\Windows SharePoint Services\Shared Documents\Project Management\
Under this folder you will see the (now connectionless) Iteration Backlog.xlsm.
Open it & under "Team" choose "New List" & connect it to your Query "Iteration 1" or similar suitable Query.
I also come across same issue. After trying following changes it started working.
Check from edit query in Azur if your query using variable like "#RecentProjectActivity" then replace it with other possible static references like you can refer some Area Path or any ID. Hope it will resolve your issue. Thank you.
I got this because the query Iteration 1/Iteration Backlog didn't work because I had change the iteration structure but not updated the query correspondingly.
So if you get this error, check that the query that the Excel list is using is working.
Faced similar problem when using # macros like '#currentiteration'.
Excel 2013 is not supporting importing Query with filters with macros to be added as List
Changing #currentiteration to absolute name of iteration resolved the issue

ssis excel source cannot acquire connection manager at DESIGN time

I have an SSIS (super)package that consists of several (about) 40 packages, each of which has several data flow tasks, most of them loading some excel data to a sqlserver database. So I have several excel source connection managers, one per excel file.
This has always worked fine until recently : I have to change an excel source in one of my packages (a column was added in the excel which has to be loaded in the destination sqlserver table) but I cannot edit the excel source in SSIS : when I click on "columns" I get an error box "DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER". So this is a design time issue, not a run time problem. I've seen a question like this one on stackoverflow but no answer. Anyone has an idea ?
I' ve already removed office 2007 and reinstalled office 2003 on my machine, but this didn't help
it has nothing to do with 64bit mode, which I've read about here
Is there some limit on the number of connection managers in ssis ?
Most of my connection managers were created with copy/paste and hence they have the same Id, although they point to different excel files. Could this be a problem ?
I should also mention that the package runs without any problems, so it's only "editing/changing" the package that doesn't work. For the moment I circumvent this problem by disabling the data flow that should change and by replacing it with a sql statement that hardcoded inserts the data from the excel into the destination table.
Maybe another intersting thing to mention : I can create a new package and add and change excel sources without problems, but then again, when I try to copy this excel source in my package, I cannot edit it.
Did you try to check the advanced options on the Source Connection?
Right click on the component and select "Show Advanced Editor..."
Select the column mappings tab and press the Refresh button.
This should point out that the XLS connection has some additional columns or that the file that you are pointing at, cannot be pre-validated at runtime.
M.
I'm not sure if this will work but try the Work Offline option in the SSIS menu in BIDS/VS. What this should do is not validate the connection before you edit the component. It might be able to get you into the component.

Resources