Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / June 2006

Tip: Looking for answers? Try searching our database.

which settings to use sqlCe in an MFC program

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ralf Pichocki - 23 Feb 2004 11:16 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.