Re: OLE DB in windows CE 4.2, MS examples wont work

From: Joćo Paulo Figueira [eMVP] (joao.figueira_at_primeworks.takethisout.pt)
Date: 05/17/04


Date: Mon, 17 May 2004 13:56:14 +0100

Hi Pete,
Try these:
- Instead of IID_IDBDataSourceAdmin, use IID_IDBInitialize
- In order to use OLE DB on Win CE 4.2 you nee this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;825393

- Finally, take a look a the following article. It may help you:
http://www.pocketpcdn.com/articles/atl_ole_db.html

-- 
Joćo Paulo Figueira
Embedded MVP
"plandry" <plandry@newsgroups.nospam> wrote in message
news:AE04212F-4C9E-4FC2-936A-6D71A84DCB69@microsoft.com...
> Hi, my ultimate aim is to get ole db access to sql server ce working in a
COM object. I've tried two things:
> 1) I've tried making a COM object that creates a database in sql server
ce, using the sample code from the sql server ce books online. The error I
get here is Upper1.obj : error LNK2019: unresolved external symbol
_IID_IDBDataSourceAdmin referenced in function "public: virtual long __cdecl
CUpper1::ToUpper(unsigned short *,unsigned short * *)"
(?ToUpper@CUpper1@@UAAJPAGPAPAG@Z), and the offending line is
> hr = CoCreateInstance( CLSID_SQLSERVERCE_2_0, 0, CLSCTX_INPROC_SERVER,
>     IID_IDBDataSourceAdmin, (void**)& pIDBDataSourceAdmin);
>
> 2) I've tried simply compiling the NorthWind example that comes with sql
server ce, and that also fails to compile. I get C:\Program Files\Windows CE
Tools\wce420\STANDARDSDK_420\Include\x86\oledb.h(13695) : error C2061:
syntax error : identifier 'IAuthenticate'
> I get 8 of those (every time it appears in oledb.h) Is there any reason
why oledb.h itself would produce an error? I've reinstalled the standard
SDK, and looked for other definitions of IAuthenticate, but that didn't
help.
>
> Any help resolving either of these issues would be most appreciated,
thanks
>
> pete