CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 1999
    Location
    ks
    Posts
    523

    ADO Changes???????????? - code no longer works/compiles

    have some old code that compiled using the following:

    #import "c:\program files\common files\system\ado\msdao15.dll" no_namespaces

    now it is providing the following erro:

    c:\documents and settings\administrator\my documents\visual studio 2005\projects\mschart\mschart\mschartdlg.h(28) : warning C4185: ignoring unknown #import attribute 'no_namespaces'
    c:\documents and settings\administrator\my documents\visual studio 2005\projects\mschart\mschart\mschartdlg.h(28) : fatal error C1083: Cannot open type library file: 'c:\program files\common files\system\ado\msdao15.dll': No such file or directory


    searched the web for poosible other approaches - found this:

    #import "C:\Program files\Common Files\System\Ado\msado15.dll" rename_namespace("MSXML") rename("EOF", "ADOEOF")

    it gags on the following:

    c:\cds\classlibrary\accessdbmanager.h(31) : error C2146: syntax error : missing ';' before identifier 'CommandPtr'

    appreciate any insight.

  2. #2
    Join Date
    Oct 1999
    Location
    ks
    Posts
    523

    Re: ADO Changes???????????? - code no longer works/compiles

    typo in the filename - sshould be msado - not msdao, however: now getting this:

    c:\documents and settings\administrator\my documents\visual studio 2005\projects\mschart\mschart\debug\msado15.tlh(2375) : error C2059: syntax error : '-'

    which points to this code:


    VARIANT_BOOL EOF;

    in msado15.tlh

    any help out there?

  3. #3
    Join Date
    Feb 2005
    Posts
    2,160

    Re: ADO Changes???????????? - code no longer works/compiles

    The typedefs for EOF conflict with some in the stdc++ libraries. If you use no_namespace, you have to rename that export to something else. Most commonly I've seen EndOfFile used:

    Code:
    #import <C:\Program Files\Common Files\System\ADO\msado15.dll> no_namespace rename("EOF","EndOfFile")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured