FIX: DBFILETIME Undeclared Identifier Error Compiling OLE DB Template Classes (217218)



The information in this article applies to:

  • Microsoft Visual Studio 6.0 SP3
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

This article was previously published under Q217218

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

Modification Type:MajorLast Reviewed:6/18/2001
Keywords:kbbug kbConsumer kbProvider kbVS600sp3fix KB217218