Data Connection Error After Publishing - InfoPath Dev
in

InfoPath Dev

Data Connection Error After Publishing

Last post 11-19-2010 02:55 PM by bblanke. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 11-16-2010 07:42 AM

    • bblanke
    • Top 500 Contributor
      Male
    • Joined on 11-12-2009
    • Milwaukee, WI
    • Posts 32

    Data Connection Error After Publishing

    While testing for our transfer from XP to 7, I came across a problem.

    If I open a new form from Sharepoint in Windows 7, I get an error messages that it cannot connect to my data connections that are windows server databases. I run queries on these databases using VB in the loading event. It works fine in XP, nut not 7.

    However, if I go to design the form and not adjust anything and click preview, everything works fine. So then I thought maybe I just need to save the form from Windows 7, I created a test Form Library on Sharepoint and published my form there and it still fails with the data connection issue as above.

    Does anyone have some insight as to how I can fix this?

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

    Brandon Blanke
    Technical Analyst / Quad Graphics
  • 11-19-2010 09:58 AM In reply to

    Re: Data Connection Error After Publishing

    Are you using IP data connections in your code? Or some other approach? What is the trust level on the form?
    Hilary Stoupa

  • 11-19-2010 10:12 AM In reply to

    • bblanke
    • Top 500 Contributor
      Male
    • Joined on 11-12-2009
    • Milwaukee, WI
    • Posts 32

    Re: Data Connection Error After Publishing

    I don't believe I'm using IP connections in the code.

    This is the code I use to run the query:
    ' Get the EMPLOYEE_VW connection from the DataConnections collection.
    Dim myEMPLOYEE_VW As AdoQueryConnection = _
    DirectCast(Me.DataConnections("EMPLOYEE_VW"), AdoQueryConnection)

    ' Change the SQL command for EMPLOYEE_VW connection to retrieve
    ' the record of the Username from the current user.
    myEMPLOYEE_VW.Command = "select * from [EMPLOYEE_VW] where [COMPUTER_USERNAME] = upper('" + CUser + "')"

    ' Execute the updated command against the data connection to refresh the data.
    myEMPLOYEE_VW.Execute()

    I added the data connection through the data connection wizard, selecting Microsoft SQL Server.

    The trust level is set to automatic, and while grayed out it has Domain Highlighted.

    The weird thing is it works when I preview it but not when it's published.

    Brandon Blanke
    Technical Analyst / Quad Graphics
  • 11-19-2010 10:55 AM In reply to

    • bblanke
    • Top 500 Contributor
      Male
    • Joined on 11-12-2009
    • Milwaukee, WI
    • Posts 32

    Re: Data Connection Error After Publishing

    I'm also running on WSS not MOSS it that makes a difference.
    Brandon Blanke
    Technical Analyst / Quad Graphics
  • 11-19-2010 11:32 AM In reply to

    Re: Data Connection Error After Publishing

    You are using a form data connection, so it shouldn't require full trust. What happens on your local machine if instead of Design / Preview, you simply open the form? Instead of opening from SharePoint?

    Is your SharePoint site in your local intranet? (I'm trying to think of things that may be different between your XP machine and your Windows 7 machine).

    Hilary Stoupa

  • 11-19-2010 11:45 AM In reply to

    • bblanke
    • Top 500 Contributor
      Male
    • Joined on 11-12-2009
    • Milwaukee, WI
    • Posts 32

    Re: Data Connection Error After Publishing

    Opening a form from my local machine works fine.

    SharePoint is on the local intranet.
    Brandon Blanke
    Technical Analyst / Quad Graphics
  • 11-19-2010 12:20 PM In reply to

    Re: Data Connection Error After Publishing

    Do you have one machine that is Windows 7? Or more than one? Does it fail on all Windows 7 machines? For all users? Sorry -- as you can tell, I don't know what is causing this, just trying to help you brainstorm solutions.
    Hilary Stoupa

  • 11-19-2010 01:14 PM In reply to

    • bblanke
    • Top 500 Contributor
      Male
    • Joined on 11-12-2009
    • Milwaukee, WI
    • Posts 32

    Re: Data Connection Error After Publishing

    It is failing on all Windows 7 Machines, for all users. Thank you for all your help, I'm just in a bind because the form this is for is a used for troubleshooting users issues in our department, and having accurate data is difficult to get if we rely on the users for all the data.
    Brandon Blanke
    Technical Analyst / Quad Graphics
  • 11-19-2010 02:30 PM In reply to

    Re: Data Connection Error After Publishing

    The big difference going between XP and Windows 7 is user account control (UAC).  The first thing to try is make sure to run as administrator following these steps.

    1) Close all Internet Explorer and InfoPath windows.  Check in task manager to make sure none are hanging around.

    2) Run IE as administrator.  Navigate to the SharePoint site (making sure it shows local intranet in the taskbar), and then open the form.

     

    Also, where do the databases reside?

     

  • 11-19-2010 02:55 PM In reply to

    • bblanke
    • Top 500 Contributor
      Male
    • Joined on 11-12-2009
    • Milwaukee, WI
    • Posts 32

    Re: Data Connection Error After Publishing

    The taskbar for windows or the status bar of IE?

    The status bar only says trusted sites | protected mode:off

    The task bar for my network status says company.com (internet access)

     When I run IE as admin and go to Sharepoint I still get the Access Denied Errors.

    Brandon Blanke
    Technical Analyst / Quad Graphics
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.