CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2013

    lib using OLE DB TEMPLATE

    Hi, thank you for reading this thread. My question contains two projects that are under the same solution.

    I have created a dll where I use inside the project, OLE Db Template. In the project, I use this code.

    class MyClass
    LONG _value1;
    SHORT _value2;

    COLUMN_ENTRY(1, _value1)
    COLUMN_ENTRY(2, _value2)


    Project_2: Is a project testing the Project_1.
    - I want to call one of the exported functions.
    - In Linker/Addional Dependencies, I have added the .lib
    - In Linker/Additional Libray Directories, I have added the directory where is the lib.
    - In C/C++/General/Additional Include Directories, I have added the directory on project 1. I did that because I want to #include a header in Project_1. But, when I do that, I get:

    Error 1 error C3646: 'COLUMN_ENTRY' : unknown override specifier
    Error 2 error C2059: syntax error : 'constant'
    Error 3 error C3646: 'COLUMN_ENTRY' : unknown override specifier

    I have done it several time with other projects, but the first time with OLE DB Template. atl90.dll is registered.

    Thank you

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: lib using OLE DB TEMPLATE

    You're missing some headers. You can add these by starting by adding a C++ class, and choosing the OLE DB Consumer class.

    [Edit] I noticed that after adding the OLE DB Consumer class, the following have been added to the stdafx.h header:

    #include <atlbase.h>
    #include <atlstr.h>
    #include <atldbcli.h>
    Last edited by Arjay; March 19th, 2013 at 07:47 PM.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.