locked
MS ACCESS automation problem RRS feed

  • Question

  • User-1923689788 posted

    Hi, I have a classic asp application in IIS 7.5 on a windows 7 (64bit) that uses the Set objAccess=Server.Create(Access.Application.14) (I have office 2010). It throws an access permissions in this line. I searched the Internet and found that I have to give permissions about DefaultAppPool identity to Microsoft Access COM component (in dcomcnfg) . I did it. It passed this line but in the next line that set the objAccess.Visible=false I have another error '800a0997' that I did not find anything about in Internet. It seems that the class does not instantiated very well because even if I comment this line then the next line that uses this Access object has again the same error. I use the process monitor and I couldn't see something wrong!!!

    I am desperate!!!

    Thanks

    Saturday, May 7, 2016 8:27 PM

All replies

  • User-1923689788 posted

    It seems that Microsoft  has totally removed automation from office 2010... I have the same problem in  IIS 5.1 on windows xp... I will install previous office version that when I had it everything was ok!

    Microsoft disappointed me... Another step towards to Linux!!!

    Sunday, May 8, 2016 10:20 AM
  • User-1923689788 posted

    When I use automation in vba code from within Access form everything is ok. I can open another database and export a report in pdf format. Here is the code.

        Dim ac As Object
        Set ac = CreateObject("Access.Application")
        ac.Visible = false
        ac.OpenCurrentDatabase CurrentProject.Path & "\test_database.accdb"
        ac.DoCmd.OutputTo acOutputReport, "Report1", acFormatPDF, CurrentProject.Path & "\test.pdf"
        ac.Quit

    The same code in asp has the previous problems.... I give up... The asp code was running with no problems for years in a windows xp, IIS 5, Office 2007.... some microsoft update may have create problems...

    Sunday, May 8, 2016 11:09 AM
  • User-1923689788 posted

    Finally... I used custom identity to IIS and added my local account that has admin privileges... It works with all output formats (xl,txt) but not with pdf!!!!!!!!!!! it throws that "Microsoft Access can not save the data to the file you have requested" in visual studio 2015 debugger!!!

    It has problem only with "PDF Format (*.pdf)" AND "XPS Format (*.xps)" but not for example with "MS-DOS Text (*.txt)" or "Excel Format (*.xlsx)"

    Sunday, May 8, 2016 9:41 PM
  • User1278090636 posted

    Hi,

    Have you installed an add-in for PDF or XPS format file?

    You can save as a PDF or XPS file from a 2007 Microsoft Office system program only after you install an add-in.

    Please take following link as reference:

    http://support.office.microsoft.com/client/HA010167527?lcid=1033

    Best Regards,

    Jean

    Monday, May 9, 2016 2:19 AM
  • User-1923689788 posted

    Hi,

    Have you installed an add-in for PDF or XPS format file?

    You can save as a PDF or XPS file from a 2007 Microsoft Office system program only after you install an add-in.

    Please take following link as reference:

    http://support.office.microsoft.com/client/HA010167527?lcid=1033

    Best Regards,

    Jean

    xmmmmm....

    In my case...

    I have two machines... There is not Access 2010 pdf add-in in any of the two MS Offices. But... in one I have installed Acrobat Pro XI. In this machine there is no problem!!!!!!!!

    I will install Acrobat Pro in the other machine too... and I will come back...!!!

    Monday, May 9, 2016 12:30 PM
  • User-1923689788 posted

    No... I have installed Acrobat Pro to the second machine but neither now!!! I do not know why it is ok in the first machine!!

    Friday, May 13, 2016 9:03 AM
  • User1278090636 posted

    Hi,

    Please try change the identity of the Microsoft Access Application.

    I opened my Access application on the Windows 2008 Server R2, I opened the VB Editor and then I ran dcomcnfg.exe.

    I searched for Microsoft Access Application under the node DCOM Config. I changed the Identity Properties from launching user to This user, specifying a user with all requested permission, such as an administrator user.

    Pick form (http://stackoverflow.com/questions/24228078/asp-net-microsoft-office-interop-access-exp-pdf-dll-issue-when-using-docmd-outpu)

    Best Regards,

    Jean

    Tuesday, May 17, 2016 7:25 AM