FIX: DBFILETIME Undeclared Identifier Error Compiling OLE DB Template Classes

This article has been archived. It is offered "as is" and will no longer be updated.
When compiling an Active Template Library (ATL) OLE DB Provider or Consumer project, you get one or more of the following compilation errors:
...\atldbcli.h(76) : error C2065: 'DBFILETIME' : undeclared identifier
...\atldbcli.h(76) : error C2059: syntax error : ')'
...\atldbcli.h(76) : error C2143: syntax error : missing ';' before '{'
...\atldbcli.h(76) : error C2447: missing function header (old-style formal list?)
A header file (atldbcli.h) used by the ATL OLE DB Provider and Consumer template class utilizes a data type DBFILETIME that is no longer defined in the oledb.h header file installed by the Microsoft Data Access SDK 2.1. The newer version of the oledb.h file uses FILETIME rather than DBFILETIME.The Oledb.h file installed by Data Access SDK 2.1, shows the as created on date Friday, November 13, 1998 and does not include the definition of DBFILETIME.
This problem is fixed in Visual C++ version 6.0 Service Pack 3.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
More information
Older versions of oledb.h define DBFILETIME as an equivalent structure to the Win32 FILETIME. The duplicate definition was removed in the version of oledb.h installed by the Microsoft Data Access SDK 2.1 to avoid confusion between the two identical types.

The atldbcli.h header file that ships with Visual C++ 6.0 uses the older DBFILETIME structure, and will generate the "'DBFILETIME' : undeclared identifier" compiler error if used with the newer version of oledb.h. Visual C++ version 6.0 Service Pack 3 installs an updated version of atldbcli.h that uses the FILETIME structure rather than DBFILETIME.
not available

Article ID: 217218 - Last Review: 02/21/2014 00:33:48 - Revision: 2.0

  • kbnosurvey kbarchive kbbug kbprovider kbvs600sp3fix KB217218