Hi!
I just am working with the Northwind Sample and the "OLE DB and SQL Server
CE" help file.
So I created a brand new MFC application and wanted to port the code bit by
bit.
As the first action, I put the following last entry into my stdafx.h:
#define OLEDBVER 0x210
#define DBINITCONSTANTS
#define INITGUID
// OLEDB Files:
#include <oledb.h>
#include <oledberr.h>
#include <coguid.h>
// SSCE Files:
#include <ssceoledb.h>
When I try to compile this, however, DBPROP is unknown, amonghst others. It
seems that not even oledb.h is properly included.
Do I have to define, undefeine or switch something somewhere? I suspect that
yes, but what?
I already deleted VC_EXTRALEAN (of which I don't know if it was necessary).
Thanks in advance and

Signature
Regards, Pi (Ralf Pichocki).
Ralf Pichocki - 23 Feb 2004 11:34 GMT
It's even worse:
I now did put something invalid into my oledb.h: "dummy" as the first line,
but the compiler does not show this error...

Signature
Regards, Pi (Ralf Pichocki).
Ralf Pichocki - 23 Feb 2004 11:41 GMT
Ok, now I found out that the symbol
__oledb_h__
seems to be defined somewhere already which prevents the oledb.h file from
being compiled.
Do I have to set something for this beforehand?

Signature
Regards, Pi (Ralf Pichocki).
Ralf Pichocki - 23 Feb 2004 11:45 GMT
Oops, I found out:
it's one of those super smart MFC tricks: instead of requiring to DEFINE
__oledb_h__, I have to UNDEFINE it to include its headers...

Signature
Regards, Pi (Ralf Pichocki).
sudhacnaidu - 30 Jun 2006 07:52 GMT
Hi Ralf,
Can you give me the exact steps followed to solve the problem. I am stuck
with the same problem and not able to figure out the solution
My application does not use MFC
Regards,
Sudha