Forum Discussion

keith_thomas's avatar
keith_thomas
New Contributor
14 years ago

Unable to interact with Office 2010 on Windows 7 64bit

If I run a standalone VBScript I can access Excel just fine. However exactly the same code,




    Set oCn =
CreateObject("ADODB.Connection")


    Set oRS =
CreateObject("ADODB.RecordSet")


     With
oCn


                                    .Provider =
"Microsoft.ACE.OLEDB.12.0"


                                    .ConnectionString = "Data Source=
" & CongfigFilePath & ";" & _


                                    "Extended Properties=Excel 12.0"


                                    .Open


        End
With




throws the following error,



   An exception occurred in the "<my js source file>" unit at line xxx:

   ADODB.Connection

   Provider cannot be found. It may not be properly installed.



when running inside TestComplete 8.20.538.7

6 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi,



    I understand the situation this way:

    -- When you execute standalone VBScript, you are running it from the 64-bit command prompt using 64-bit VBScript engine that looks in the 64-bit registry for the requested provider;

    -- TestComplete is 32-bit application, thus it uses 32-bit VBScript engine and is looking in the 32-bit registry for the provider. As the provider was installed as 64-bit application, it is not present in the 32-bit registry and thus script fails.



    I don't have exact solution at hand, but would suggest to search MS site for the 32-bit version of the ADO provider that can work with your Excel file.

    Also you may consider to look into 32-bit Office installation and try to install only ADO from there.
  • Thanks for the pointers. Would I be correct in assuming that TestComplete will be available as a 64 bit app in the near future?



    Also, the app we are testing is now 64bit only. Are there implications for trying to continue to use Test Complete to test our 64bit app?
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi,



    > Would I be correct in assuming that TestComplete will be available as a 64 bit app in the near future?

    I cannot give you official answer (see my signature), but it is my understanding that there will be no 64-bit version in the near future because so far TestComplete can test both 32- and 64-bit applications.



    > Also, the app we are testing is now 64bit only. Are there implications for trying to continue to use Test Complete to test our 64bit app?

    TestComplete can *interact with and drive* 64-bit applications without any problem.

    The problem in your case is that your script (being 32-bit process) tries to use inproc COM component which is implemented as 64-bit application. But OS does not allow to mix components with different 'bitness' within one process. (You will have likewise problem if try to use 32-bit component from within 64-bit process.)
  • Thanks again Alex. I am now running,

    - My driver VBS script in the 32 bit command prompt

    - The 32 bit Access connector software

    - Office 2007 32bit

    and everything appears to be working :)
  • Hi All,



    Do I get it right that Alex's suggestion about the driver's bitness was correct, and the problem is solved now?



    As for:

    Would I be correct in assuming that TestComplete will be available as a 64 bit app in the near future?


    currently, there're no plans to make an x64 version of TC itself. It just includes x64 modules which allow you to interact with x64 applications and use x64 DLLs/.NET assemblies.