none
Query for SQL compact framework for WinCE 7

    Question

  • I am trying to develop an application on SQL for WinCE 7 and aware of following facts:

    1.       There are 2 ways to access SQL compact database from application -
      1.      Through a managed programing language such as C# or VB.NET which require .NET compact framework.
      2.      By using SQL native client programing (OLE DB).
    2.       The version of SQL compact dlls that Visual studio 2008 is using (by default without any update) is V3.5.5386.
    3.       I have the necessary and required registry settings for SQL CE .cab installer for version V3.5.5386 and V3.5.8154 for my Wince Device and I have .cab installer for both.
    4.       When I add SQL compact framework in catalog item of platform builder and build the image, then Version of SQL compact is V3.5.8154 which I checked from registry of device.

    I have the following questions for application on Wince 7 (assumed that device does not have SQL compact framework by default and we have to use the .cab installer to install SQL framework):

    1.  When I made application for SQL to access database using C#, the application would work fine if SQL CE V3.5.5386 framework is installed on device. Yes this is what it should be because of the point 2) mentioned above. But, if I am trying to access database using native programing (OLE DB) and SQL CE V3.5.5386 framework is installed on device, then the application freezes or enters a wait state.

    “CoCreateInstance(CLSID_SQLSERVERCE_3_5,     NULL,    CLSCTX_INPROC_SERVER, IID_IDBInitialize,  (void**)&pIDBInitialize) ” 

    -  returns successfully  

    “pIDBInitialize->QueryInterface(IID_IDBDataSourceAdmin, (void **) &pIDBDataSourceAdmin)”

    -  returns successfully 

    “pIDBDataSourceAdmin->CreateDataSource(1, dbpropset, NULL, IID_IUnknown, &pIUnknownSession)”

    -        Here the application freezes or waits.

    But if I install SQL CE V3.5.8154 framework, the application work properly.

    What is the reason for it, is it because of the fact that Wince 7 support for SQL compact is only available in the higher version of SQL compact (if not wrong after V3.5.8088) according to this article:

    http://erikej.blogspot.dk/2010/08/sql-server-compact-35-sp2-downloadable.html

    1.       I was not able to find any article or information about the SQL compact framework V3.5.8154.
    2.       What updates are required to update the SQL dlls from V3.5.5386 to V3.5.8154 that are used for C# application.

    I am deplorable for post such huge query but if anybody have any information on it then please reply to this post.

    Friday, May 23, 2014 1:45 PM

All replies

  • I am unsure what you are asking, can you just not deploy the latest cab files with your app?

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    Saturday, May 24, 2014 10:10 AM
  • Yes I can deploy the latest version with my app. but problem is, when I am accessing SQL database from C# application it searches for SQL V3.5.5386 and not SQL V3.5.8154 because:

    "The version of SQL compact dlls that Visual studio 2008 is using (by default without any update) is V3.5.5386 " when i make application i make in c#.

    I am not able to find any article or information about SQL CE V3.5.8154 and the latest update seems to be V3.5.8109 

    As mentioned in this article:

    http://erikej.blogspot.dk/2010/08/sql-server-compact-35-sp2-downloadable.html

    Sunday, May 25, 2014 4:48 AM
  • Insall the 3.5 SP2 SDK, and then update the reference to System.Data.SqlServerCe to assembly version 3.5.1.0 (from 3.5.0.0)

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    Sunday, May 25, 2014 9:22 AM
  • Dear ErikEJ,

    1) I found a post that will help you understand my problem in a better way (it is very much similar):

    http://mall.51zks.com/Problem/index/-630977995/native-components-of-version-8154-that-are-incompatible-with-adonet-provider-of-version-8080/

    2) I have updated the reference, as you mentioned to 3.5.1.0 but this error message is shown (I used .cab installer for SQL CE V3.5.8154):

    "MissingMethodException File or assembly name "System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies was not found."

    3) I want to use same SQL CE dlls (specifically V3.5.8154) for my both application, one in C# and other in Native using OLE DB.

    Looking forward to get back your response soon.

    Thanks and regards,

    Rajat

    Monday, May 26, 2014 5:53 AM