Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

ATL Provider Error ATL2012

Error Message

Missing attribute db_accessor(num).

The provider encountered an out-of-sequence db_accessor attribute.

Ensure that the arguments to successive db_accessor attributes start at 0 and increase by 1.

The following sample generates ATL2012.

// ATL2012.cpp
// compile with: /c
// ATL2012 expected
#define _ATL_ATTRIBUTES
#include <atlbase.h>
#include <atldbcli.h>

[ db_command("Select FirstName, LastName from Employees") ]
class CEmployees {
public :
   [ db_accessor(0, TRUE) ];
   [ db_column("1") ]TCHAR m_szFirstName[21];
   [ db_accessor(2, TRUE)];   // to resolve, change to 1
   [db_column("2") ] TCHAR m_szLastName[21];
};
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.