CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    Pakistan
    Posts
    260

    importing ado giving redefination error in VS2005

    Hi,

    Ado does not compile in visual studio 2005

    the code

    #import "C:\Program Files\common files\system\ado\msado20.tlb"
    rename("EOF","EndOfFile")

    works well in older version like 2003 , 6.0 etc ,but in VS2005 it does not compile and giving refefination error..



    Error 7 error C2011: 'IBindResource' : 'struct' type redefinition
    ...\sources\dblib\debug\o ledb32.tlh 251
    Error 8 error C2011: 'ICreateRow' : 'struct' type redefinition
    ..\sources\dblib\debug\o ledb32.tlh 289
    ....

    Error 18 error C2027: use of undefined type 'IBindResource'
    ..\sources\dblib\debug\o ledb32.tli 100
    Error 19 error C3861: 'raw_RemoteBind': identifier not found
    ..\sources\dblib\debug\o ledb32.tli 101
    .....

    The errors exist in the auto-generated files,oledb32.tlh and oledb32.tli. I
    cannot find the correct solution for it.

    Please help me

    regards

  2. #2
    Join Date
    Aug 2004
    Location
    Pakistan
    Posts
    260

    Re: importing ado giving redefination error in VS2005

    if i am making any mistake then let me know , any tip or guidence will be appreciable??

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

    Re: importing ado giving redefination error in VS2005

    I don't know. I've always just imported the dll directly. I've never tried the .tlb as an import.

    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