FIX: DBFILETIME Undeclared Identifier Error Compiling OLE DB Template Classes

ID: Q217218


The information in this article applies to:


SYMPTOMS

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?)


CAUSE

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.


RESOLUTION

This problem is fixed in Visual C++ version 6.0 Service Pack 3.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products 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:

Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

Q194295 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.

Additional query words: not available


Keywords          : kbservicepack kbATL kbDatabase kbOLEDB kbProvider kbConsumer kbVS600sp2 kbVS600SP1 kbVS600sp3fix kbGrpVCDB 
Version           : WINDOWS:6.0 SP3
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 19, 1999