ADO, ActiveX DLL and Win2000


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: ADO, ActiveX DLL and Win2000

  1. #1
    Craig Guest

    ADO, ActiveX DLL and Win2000


    Hi

    I've just moved a web app from IIS 4 on WinNT to IIS 5 on Win2000. I've
    run into a problem with some of my ActiveX DLL methods. Any method that
    accesses my DB (SQL Server 7) comes up with the following error:

    Invalid procedure call or argument

    Any method that doesn't use ADO works fine. This website worked on WinNT/IIS4.
    I think the problem is with the version of MDAC (was 2.1 on WinNT, now appears
    to be 2.5 on Win2000). I've tried recompiling the DLL with ADO 2.5 as the
    reference, but this hasn't helped. I could move the code from the DLL to
    the ASP pages, but I hope to avoid that, especially since it was working
    fine on the old version. Also, I've written a some VB app that uses the
    DLL, and it works on the Win2000 PC.

    Thanks for any help.

  2. #2
    Marc D'Aoust Guest

    Re: ADO, ActiveX DLL and Win2000

    I had a similar problem. Mine occurred every time I called BeginTrans on a
    connection object. My solution was this.

    First read MS knowledge base article #Q198432. It may not be directly
    relevant, but try going trough the modifications it details anyway.

    If your objects are registered with COM+ then delete them from the manager.
    Then Unregister your dll's, and you can even run RegClean, just to be
    thorough.

    After that, create an Internet Package with the VB6 P&D wizard for each of
    the dll's you want to deploy.
    When that's done, you can re-deploy your dll's. Register them on the server,
    then run the .htm file generated by the wizard. This will "properly"
    register your components. you can then re-install them with com+

    I'm not sure yet exactly why this worked, so I won't share my speculations
    with you (since the dll's work in debug mode but not compiled, I'm betting
    it probably has something to do with security).

    Let me know if this fixes your problem.


    Marc D'Aoust
    marc_daoust@hotmail.com



    "Craig" <cjewiss@hotmail.com> wrote in message
    news:39236d69$1@news.devx.com...
    >
    > Hi
    >
    > I've just moved a web app from IIS 4 on WinNT to IIS 5 on Win2000. I've
    > run into a problem with some of my ActiveX DLL methods. Any method that
    > accesses my DB (SQL Server 7) comes up with the following error:
    >
    > Invalid procedure call or argument
    >
    > Any method that doesn't use ADO works fine. This website worked on

    WinNT/IIS4.
    > I think the problem is with the version of MDAC (was 2.1 on WinNT, now

    appears
    > to be 2.5 on Win2000). I've tried recompiling the DLL with ADO 2.5 as the
    > reference, but this hasn't helped. I could move the code from the DLL to
    > the ASP pages, but I hope to avoid that, especially since it was working
    > fine on the old version. Also, I've written a some VB app that uses the
    > DLL, and it works on the Win2000 PC.
    >
    > Thanks for any help.




  3. #3
    Craig Guest

    Re: ADO, ActiveX DLL and Win2000


    Marc

    Thanks for your help, but I had incorrectly identified the problem. After
    doing more work, I actually found that the security context for the IUSR_
    account is different in Windows 2000. Every ADO component I have gets the
    DSN, UserID, and Password from the registry. The IUSR_ account in Windows
    2000 didn't have the necessary rights to read the registry keys.

    Thanks for your help anyway. I found the article interesting reading.

    "Marc D'Aoust" <marc_daoust@hotmail.com> wrote:
    >I had a similar problem. Mine occurred every time I called BeginTrans on

    a
    >connection object. My solution was this.
    >
    >First read MS knowledge base article #Q198432. It may not be directly
    >relevant, but try going trough the modifications it details anyway.
    >
    >If your objects are registered with COM+ then delete them from the manager.
    >Then Unregister your dll's, and you can even run RegClean, just to be
    >thorough.
    >
    >After that, create an Internet Package with the VB6 P&D wizard for each

    of
    >the dll's you want to deploy.
    >When that's done, you can re-deploy your dll's. Register them on the server,
    >then run the .htm file generated by the wizard. This will "properly"
    >register your components. you can then re-install them with com+
    >
    >I'm not sure yet exactly why this worked, so I won't share my speculations
    >with you (since the dll's work in debug mode but not compiled, I'm betting
    >it probably has something to do with security).
    >
    >Let me know if this fixes your problem.
    >
    >
    >Marc D'Aoust
    >marc_daoust@hotmail.com
    >
    >
    >
    >"Craig" <cjewiss@hotmail.com> wrote in message
    >news:39236d69$1@news.devx.com...
    >>
    >> Hi
    >>
    >> I've just moved a web app from IIS 4 on WinNT to IIS 5 on Win2000. I've
    >> run into a problem with some of my ActiveX DLL methods. Any method that
    >> accesses my DB (SQL Server 7) comes up with the following error:
    >>
    >> Invalid procedure call or argument
    >>
    >> Any method that doesn't use ADO works fine. This website worked on

    >WinNT/IIS4.
    >> I think the problem is with the version of MDAC (was 2.1 on WinNT, now

    >appears
    >> to be 2.5 on Win2000). I've tried recompiling the DLL with ADO 2.5 as

    the
    >> reference, but this hasn't helped. I could move the code from the DLL

    to
    >> the ASP pages, but I hope to avoid that, especially since it was working
    >> fine on the old version. Also, I've written a some VB app that uses the
    >> DLL, and it works on the Win2000 PC.
    >>
    >> Thanks for any help.

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center