lib using OLE DB TEMPLATE
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: lib using OLE DB TEMPLATE

  1. #1
    Join Date
    Mar 2013
    Posts
    2

    lib using OLE DB TEMPLATE

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

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

    class MyClass
    {
    public:
    LONG _value1;
    SHORT _value2;


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

    END_COLUMN_MAP()
    };


    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
    Posts
    11,197

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center