Potential bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jessard

    Potential bug?

    Hi,

    Can somebody try this? Make a new .NET class library with one class.
    Create a method that simply instantiates an instance of ADODB.Connectio n.
    You will need to reference the ADODB assembly under .NET tab. Build the
    project. Now make a vbscript file that creates an object of the class you
    have just built. Then call the public method (which will attempt to
    instantiate the ADODB.connectio n). If you have added a strong key and
    registered the type library, and placed the assembly in the global assembly
    cache all works fine. However, try moving the assembly to a computer without
    visual studio (with a setup project) and see how you go.

    I get a "File or Assembly name ADODB, or one of its dependencies was not
    found". How bout you?
    Jesse
  • Nick Malik [Microsoft]

    #2
    Re: Potential bug?

    install MDAC on the target computer

    --
    --- Nick Malik [Microsoft]
    MCSD, CFPS, Certified Scrummaster


    Disclaimer: Opinions expressed in this forum are my own, and not
    representative of my employer.
    I do not answer questions on behalf of my employer. I'm just a
    programmer helping programmers.
    --
    "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
    news:77885FB6-3DD2-41D8-8725-1047C297F32B@mi crosoft.com...[color=blue]
    > Hi,
    >
    > Can somebody try this? Make a new .NET class library with one class.
    > Create a method that simply instantiates an instance of ADODB.Connectio n.
    > You will need to reference the ADODB assembly under .NET tab. Build the
    > project. Now make a vbscript file that creates an object of the class you
    > have just built. Then call the public method (which will attempt to
    > instantiate the ADODB.connectio n). If you have added a strong key and
    > registered the type library, and placed the assembly in the global[/color]
    assembly[color=blue]
    > cache all works fine. However, try moving the assembly to a computer[/color]
    without[color=blue]
    > visual studio (with a setup project) and see how you go.
    >
    > I get a "File or Assembly name ADODB, or one of its dependencies was not
    > found". How bout you?
    > Jesse[/color]


    Comment

    • Jessard

      #3
      Re: Potential bug?

      Hi Nick,

      I have. First 2.6, 2.6 and now 2.8.

      Did you try it and if so did it work?

      Jesse

      "Nick Malik [Microsoft]" wrote:
      [color=blue]
      > install MDAC on the target computer
      >
      > --
      > --- Nick Malik [Microsoft]
      > MCSD, CFPS, Certified Scrummaster
      > http://blogs.msdn.com/nickmalik
      >
      > Disclaimer: Opinions expressed in this forum are my own, and not
      > representative of my employer.
      > I do not answer questions on behalf of my employer. I'm just a
      > programmer helping programmers.
      > --
      > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
      > news:77885FB6-3DD2-41D8-8725-1047C297F32B@mi crosoft.com...[color=green]
      > > Hi,
      > >
      > > Can somebody try this? Make a new .NET class library with one class.
      > > Create a method that simply instantiates an instance of ADODB.Connectio n.
      > > You will need to reference the ADODB assembly under .NET tab. Build the
      > > project. Now make a vbscript file that creates an object of the class you
      > > have just built. Then call the public method (which will attempt to
      > > instantiate the ADODB.connectio n). If you have added a strong key and
      > > registered the type library, and placed the assembly in the global[/color]
      > assembly[color=green]
      > > cache all works fine. However, try moving the assembly to a computer[/color]
      > without[color=green]
      > > visual studio (with a setup project) and see how you go.
      > >
      > > I get a "File or Assembly name ADODB, or one of its dependencies was not
      > > found". How bout you?
      > > Jesse[/color]
      >
      >
      >[/color]

      Comment

      • Nick Malik [Microsoft]

        #4
        Re: Potential bug?

        I've directly coded, or supervised, two dozen different projects that use
        database connectivity. Never had the error you are discussing.

        Tell me about the systems that you are using. What is the configuration of
        your dev machine? your target machine?

        (Especially your target machine: do you have any service packs installed?
        Were there errors when installing the framework?)

        Have you taking your target app and installed it anywhere else? If so, does
        it fail there? If so, describe the config of that machine as well.

        --
        --- Nick Malik [Microsoft]
        MCSD, CFPS, Certified Scrummaster


        Disclaimer: Opinions expressed in this forum are my own, and not
        representative of my employer.
        I do not answer questions on behalf of my employer. I'm just a
        programmer helping programmers.
        --
        "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
        news:C3DA1B63-A90D-4D04-AA96-72FC94FDE7B3@mi crosoft.com...[color=blue]
        > Hi Nick,
        >
        > I have. First 2.6, 2.6 and now 2.8.
        >
        > Did you try it and if so did it work?
        >
        > Jesse
        >
        > "Nick Malik [Microsoft]" wrote:
        >[color=green]
        > > install MDAC on the target computer
        > >
        > > --
        > > --- Nick Malik [Microsoft]
        > > MCSD, CFPS, Certified Scrummaster
        > > http://blogs.msdn.com/nickmalik
        > >
        > > Disclaimer: Opinions expressed in this forum are my own, and not
        > > representative of my employer.
        > > I do not answer questions on behalf of my employer. I'm just a
        > > programmer helping programmers.
        > > --
        > > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
        > > news:77885FB6-3DD2-41D8-8725-1047C297F32B@mi crosoft.com...[color=darkred]
        > > > Hi,
        > > >
        > > > Can somebody try this? Make a new .NET class library with one class.
        > > > Create a method that simply instantiates an instance of[/color][/color][/color]
        ADODB.Connectio n.[color=blue][color=green][color=darkred]
        > > > You will need to reference the ADODB assembly under .NET tab. Build[/color][/color][/color]
        the[color=blue][color=green][color=darkred]
        > > > project. Now make a vbscript file that creates an object of the class[/color][/color][/color]
        you[color=blue][color=green][color=darkred]
        > > > have just built. Then call the public method (which will attempt to
        > > > instantiate the ADODB.connectio n). If you have added a strong key and
        > > > registered the type library, and placed the assembly in the global[/color]
        > > assembly[color=darkred]
        > > > cache all works fine. However, try moving the assembly to a computer[/color]
        > > without[color=darkred]
        > > > visual studio (with a setup project) and see how you go.
        > > >
        > > > I get a "File or Assembly name ADODB, or one of its dependencies was[/color][/color][/color]
        not[color=blue][color=green][color=darkred]
        > > > found". How bout you?
        > > > Jesse[/color]
        > >
        > >
        > >[/color][/color]


        Comment

        • Jessard

          #5
          Re: Potential bug?

          The development machine has VS.NET 2003. It is running Windows 2000 with
          SP4. I have MDAC 7.1 on it. The target machine is a Windows 2000 Server
          with SP4 also. This originally had MDAC 2.6, so I tried it with 2.7 and now
          2.8 - No luck. There were no problems installing the .NET Redistributable
          Package on it. I have also got my brother to try it on his Windows XP Pro
          machine which was a new installation so was likely to have any recent service
          packs. In addition to installing the .NET framework on his computer, I got
          him to install the SDK from the microsoft website - no go. On both target
          machines, it is fine if the class is being called by a .NET app but not when
          being called from VBscript with something like:

          Dim conn
          Set conn = CreateObject("M yAssembly.MyCla ss")
          conn.method

          It actually fails on the third line, indicating that object is created but
          when the method is called the ADODB.Connectio n object cannot be instantiated.

          I urge you to try one more time, I think you will be surprised to find that
          it will not work. Obviously, it CAN work, as it does on the development
          machine.

          By the way,
          Thanks for taking an interest.
          and
          Merry Christmas



          "Nick Malik [Microsoft]" wrote:
          [color=blue]
          > I've directly coded, or supervised, two dozen different projects that use
          > database connectivity. Never had the error you are discussing.
          >
          > Tell me about the systems that you are using. What is the configuration of
          > your dev machine? your target machine?
          >
          > (Especially your target machine: do you have any service packs installed?
          > Were there errors when installing the framework?)
          >
          > Have you taking your target app and installed it anywhere else? If so, does
          > it fail there? If so, describe the config of that machine as well.
          >
          > --
          > --- Nick Malik [Microsoft]
          > MCSD, CFPS, Certified Scrummaster
          > http://blogs.msdn.com/nickmalik
          >
          > Disclaimer: Opinions expressed in this forum are my own, and not
          > representative of my employer.
          > I do not answer questions on behalf of my employer. I'm just a
          > programmer helping programmers.
          > --
          > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
          > news:C3DA1B63-A90D-4D04-AA96-72FC94FDE7B3@mi crosoft.com...[color=green]
          > > Hi Nick,
          > >
          > > I have. First 2.6, 2.6 and now 2.8.
          > >
          > > Did you try it and if so did it work?
          > >
          > > Jesse
          > >
          > > "Nick Malik [Microsoft]" wrote:
          > >[color=darkred]
          > > > install MDAC on the target computer
          > > >
          > > > --
          > > > --- Nick Malik [Microsoft]
          > > > MCSD, CFPS, Certified Scrummaster
          > > > http://blogs.msdn.com/nickmalik
          > > >
          > > > Disclaimer: Opinions expressed in this forum are my own, and not
          > > > representative of my employer.
          > > > I do not answer questions on behalf of my employer. I'm just a
          > > > programmer helping programmers.
          > > > --
          > > > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
          > > > news:77885FB6-3DD2-41D8-8725-1047C297F32B@mi crosoft.com...
          > > > > Hi,
          > > > >
          > > > > Can somebody try this? Make a new .NET class library with one class.
          > > > > Create a method that simply instantiates an instance of[/color][/color]
          > ADODB.Connectio n.[color=green][color=darkred]
          > > > > You will need to reference the ADODB assembly under .NET tab. Build[/color][/color]
          > the[color=green][color=darkred]
          > > > > project. Now make a vbscript file that creates an object of the class[/color][/color]
          > you[color=green][color=darkred]
          > > > > have just built. Then call the public method (which will attempt to
          > > > > instantiate the ADODB.connectio n). If you have added a strong key and
          > > > > registered the type library, and placed the assembly in the global
          > > > assembly
          > > > > cache all works fine. However, try moving the assembly to a computer
          > > > without
          > > > > visual studio (with a setup project) and see how you go.
          > > > >
          > > > > I get a "File or Assembly name ADODB, or one of its dependencies was[/color][/color]
          > not[color=green][color=darkred]
          > > > > found". How bout you?
          > > > > Jesse
          > > >
          > > >
          > > >[/color][/color]
          >
          >
          >[/color]

          Comment

          • Nick Malik [Microsoft]

            #6
            Re: Potential bug?

            OK. I got more info that time. I think I get the idea.

            You are running your object from Windows Script Host, right?

            What version of WSH are you running on the target environment?
            [Normally, WSH 2.0 ships on Win2K. The current version is WSH 5.6. You can
            download the newest version from:
            http://msdn.microsoft.com/scripting ]

            --
            --- Nick Malik [Microsoft]
            MCSD, CFPS, Certified Scrummaster


            Disclaimer: Opinions expressed in this forum are my own, and not
            representative of my employer.
            I do not answer questions on behalf of my employer. I'm just a
            programmer helping programmers.
            --
            "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
            news:83F91A1D-B7FD-4A61-83B5-CD29A182CBDF@mi crosoft.com...[color=blue]
            > The development machine has VS.NET 2003. It is running Windows 2000 with
            > SP4. I have MDAC 7.1 on it. The target machine is a Windows 2000 Server
            > with SP4 also. This originally had MDAC 2.6, so I tried it with 2.7 and[/color]
            now[color=blue]
            > 2.8 - No luck. There were no problems installing the .NET Redistributable
            > Package on it. I have also got my brother to try it on his Windows XP Pro
            > machine which was a new installation so was likely to have any recent[/color]
            service[color=blue]
            > packs. In addition to installing the .NET framework on his computer, I[/color]
            got[color=blue]
            > him to install the SDK from the microsoft website - no go. On both target
            > machines, it is fine if the class is being called by a .NET app but not[/color]
            when[color=blue]
            > being called from VBscript with something like:
            >
            > Dim conn
            > Set conn = CreateObject("M yAssembly.MyCla ss")
            > conn.method
            >
            > It actually fails on the third line, indicating that object is created but
            > when the method is called the ADODB.Connectio n object cannot be[/color]
            instantiated.[color=blue]
            >
            > I urge you to try one more time, I think you will be surprised to find[/color]
            that[color=blue]
            > it will not work. Obviously, it CAN work, as it does on the development
            > machine.
            >
            > By the way,
            > Thanks for taking an interest.
            > and
            > Merry Christmas
            >
            >
            >
            > "Nick Malik [Microsoft]" wrote:
            >[color=green]
            > > I've directly coded, or supervised, two dozen different projects that[/color][/color]
            use[color=blue][color=green]
            > > database connectivity. Never had the error you are discussing.
            > >
            > > Tell me about the systems that you are using. What is the configuration[/color][/color]
            of[color=blue][color=green]
            > > your dev machine? your target machine?
            > >
            > > (Especially your target machine: do you have any service packs[/color][/color]
            installed?[color=blue][color=green]
            > > Were there errors when installing the framework?)
            > >
            > > Have you taking your target app and installed it anywhere else? If so,[/color][/color]
            does[color=blue][color=green]
            > > it fail there? If so, describe the config of that machine as well.
            > >
            > > --
            > > --- Nick Malik [Microsoft]
            > > MCSD, CFPS, Certified Scrummaster
            > > http://blogs.msdn.com/nickmalik
            > >
            > > Disclaimer: Opinions expressed in this forum are my own, and not
            > > representative of my employer.
            > > I do not answer questions on behalf of my employer. I'm just a
            > > programmer helping programmers.
            > > --
            > > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
            > > news:C3DA1B63-A90D-4D04-AA96-72FC94FDE7B3@mi crosoft.com...[color=darkred]
            > > > Hi Nick,
            > > >
            > > > I have. First 2.6, 2.6 and now 2.8.
            > > >
            > > > Did you try it and if so did it work?
            > > >
            > > > Jesse
            > > >
            > > > "Nick Malik [Microsoft]" wrote:
            > > >
            > > > > install MDAC on the target computer
            > > > >
            > > > > --
            > > > > --- Nick Malik [Microsoft]
            > > > > MCSD, CFPS, Certified Scrummaster
            > > > > http://blogs.msdn.com/nickmalik
            > > > >
            > > > > Disclaimer: Opinions expressed in this forum are my own, and not
            > > > > representative of my employer.
            > > > > I do not answer questions on behalf of my employer. I'm just a
            > > > > programmer helping programmers.
            > > > > --
            > > > > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
            > > > > news:77885FB6-3DD2-41D8-8725-1047C297F32B@mi crosoft.com...
            > > > > > Hi,
            > > > > >
            > > > > > Can somebody try this? Make a new .NET class library with one[/color][/color][/color]
            class.[color=blue][color=green][color=darkred]
            > > > > > Create a method that simply instantiates an instance of[/color]
            > > ADODB.Connectio n.[color=darkred]
            > > > > > You will need to reference the ADODB assembly under .NET tab.[/color][/color][/color]
            Build[color=blue][color=green]
            > > the[color=darkred]
            > > > > > project. Now make a vbscript file that creates an object of the[/color][/color][/color]
            class[color=blue][color=green]
            > > you[color=darkred]
            > > > > > have just built. Then call the public method (which will attempt[/color][/color][/color]
            to[color=blue][color=green][color=darkred]
            > > > > > instantiate the ADODB.connectio n). If you have added a strong key[/color][/color][/color]
            and[color=blue][color=green][color=darkred]
            > > > > > registered the type library, and placed the assembly in the global
            > > > > assembly
            > > > > > cache all works fine. However, try moving the assembly to a[/color][/color][/color]
            computer[color=blue][color=green][color=darkred]
            > > > > without
            > > > > > visual studio (with a setup project) and see how you go.
            > > > > >
            > > > > > I get a "File or Assembly name ADODB, or one of its dependencies[/color][/color][/color]
            was[color=blue][color=green]
            > > not[color=darkred]
            > > > > > found". How bout you?
            > > > > > Jesse
            > > > >
            > > > >
            > > > >[/color]
            > >
            > >
            > >[/color][/color]


            Comment

            • Jessard

              #7
              Re: Potential bug?

              Yes, I beleive vbscript uses Windows Script Host, however I'm not 100% sure.
              I installed the update for this as you suggested on my brothers XP machine
              and also service pack 2. Still the same error.

              Any other ideas?


              "Nick Malik [Microsoft]" wrote:
              [color=blue]
              > OK. I got more info that time. I think I get the idea.
              >
              > You are running your object from Windows Script Host, right?
              >
              > What version of WSH are you running on the target environment?
              > [Normally, WSH 2.0 ships on Win2K. The current version is WSH 5.6. You can
              > download the newest version from:
              > http://msdn.microsoft.com/scripting ]
              >
              > --
              > --- Nick Malik [Microsoft]
              > MCSD, CFPS, Certified Scrummaster
              > http://blogs.msdn.com/nickmalik
              >
              > Disclaimer: Opinions expressed in this forum are my own, and not
              > representative of my employer.
              > I do not answer questions on behalf of my employer. I'm just a
              > programmer helping programmers.
              > --
              > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
              > news:83F91A1D-B7FD-4A61-83B5-CD29A182CBDF@mi crosoft.com...[color=green]
              > > The development machine has VS.NET 2003. It is running Windows 2000 with
              > > SP4. I have MDAC 7.1 on it. The target machine is a Windows 2000 Server
              > > with SP4 also. This originally had MDAC 2.6, so I tried it with 2.7 and[/color]
              > now[color=green]
              > > 2.8 - No luck. There were no problems installing the .NET Redistributable
              > > Package on it. I have also got my brother to try it on his Windows XP Pro
              > > machine which was a new installation so was likely to have any recent[/color]
              > service[color=green]
              > > packs. In addition to installing the .NET framework on his computer, I[/color]
              > got[color=green]
              > > him to install the SDK from the microsoft website - no go. On both target
              > > machines, it is fine if the class is being called by a .NET app but not[/color]
              > when[color=green]
              > > being called from VBscript with something like:
              > >
              > > Dim conn
              > > Set conn = CreateObject("M yAssembly.MyCla ss")
              > > conn.method
              > >
              > > It actually fails on the third line, indicating that object is created but
              > > when the method is called the ADODB.Connectio n object cannot be[/color]
              > instantiated.[color=green]
              > >
              > > I urge you to try one more time, I think you will be surprised to find[/color]
              > that[color=green]
              > > it will not work. Obviously, it CAN work, as it does on the development
              > > machine.
              > >
              > > By the way,
              > > Thanks for taking an interest.
              > > and
              > > Merry Christmas
              > >
              > >
              > >
              > > "Nick Malik [Microsoft]" wrote:
              > >[color=darkred]
              > > > I've directly coded, or supervised, two dozen different projects that[/color][/color]
              > use[color=green][color=darkred]
              > > > database connectivity. Never had the error you are discussing.
              > > >
              > > > Tell me about the systems that you are using. What is the configuration[/color][/color]
              > of[color=green][color=darkred]
              > > > your dev machine? your target machine?
              > > >
              > > > (Especially your target machine: do you have any service packs[/color][/color]
              > installed?[color=green][color=darkred]
              > > > Were there errors when installing the framework?)
              > > >
              > > > Have you taking your target app and installed it anywhere else? If so,[/color][/color]
              > does[color=green][color=darkred]
              > > > it fail there? If so, describe the config of that machine as well.
              > > >
              > > > --
              > > > --- Nick Malik [Microsoft]
              > > > MCSD, CFPS, Certified Scrummaster
              > > > http://blogs.msdn.com/nickmalik
              > > >
              > > > Disclaimer: Opinions expressed in this forum are my own, and not
              > > > representative of my employer.
              > > > I do not answer questions on behalf of my employer. I'm just a
              > > > programmer helping programmers.
              > > > --
              > > > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
              > > > news:C3DA1B63-A90D-4D04-AA96-72FC94FDE7B3@mi crosoft.com...
              > > > > Hi Nick,
              > > > >
              > > > > I have. First 2.6, 2.6 and now 2.8.
              > > > >
              > > > > Did you try it and if so did it work?
              > > > >
              > > > > Jesse
              > > > >
              > > > > "Nick Malik [Microsoft]" wrote:
              > > > >
              > > > > > install MDAC on the target computer
              > > > > >
              > > > > > --
              > > > > > --- Nick Malik [Microsoft]
              > > > > > MCSD, CFPS, Certified Scrummaster
              > > > > > http://blogs.msdn.com/nickmalik
              > > > > >
              > > > > > Disclaimer: Opinions expressed in this forum are my own, and not
              > > > > > representative of my employer.
              > > > > > I do not answer questions on behalf of my employer. I'm just a
              > > > > > programmer helping programmers.
              > > > > > --
              > > > > > "Jessard" <Jessard@discus sions.microsoft .com> wrote in message
              > > > > > news:77885FB6-3DD2-41D8-8725-1047C297F32B@mi crosoft.com...
              > > > > > > Hi,
              > > > > > >
              > > > > > > Can somebody try this? Make a new .NET class library with one[/color][/color]
              > class.[color=green][color=darkred]
              > > > > > > Create a method that simply instantiates an instance of
              > > > ADODB.Connectio n.
              > > > > > > You will need to reference the ADODB assembly under .NET tab.[/color][/color]
              > Build[color=green][color=darkred]
              > > > the
              > > > > > > project. Now make a vbscript file that creates an object of the[/color][/color]
              > class[color=green][color=darkred]
              > > > you
              > > > > > > have just built. Then call the public method (which will attempt[/color][/color]
              > to[color=green][color=darkred]
              > > > > > > instantiate the ADODB.connectio n). If you have added a strong key[/color][/color]
              > and[color=green][color=darkred]
              > > > > > > registered the type library, and placed the assembly in the global
              > > > > > assembly
              > > > > > > cache all works fine. However, try moving the assembly to a[/color][/color]
              > computer[color=green][color=darkred]
              > > > > > without
              > > > > > > visual studio (with a setup project) and see how you go.
              > > > > > >
              > > > > > > I get a "File or Assembly name ADODB, or one of its dependencies[/color][/color]
              > was[color=green][color=darkred]
              > > > not
              > > > > > > found". How bout you?
              > > > > > > Jesse
              > > > > >
              > > > > >
              > > > > >
              > > >
              > > >
              > > >[/color][/color]
              >
              >
              >[/color]

              Comment

              Working...