12 Replies Latest reply on May 13, 2016 5:42 AM by Daniel Silva

    Windows embedded 7.

    Irma Rodriguez

      I have an app running with sql2005 on wce5 and terminals symbol MC9090.
      Company changed the terminals by new one symbol MC9200. So I converted the app from VS2005 to VS2008, database from SQL2005 to SQL2008.
      I tested using the emulator on VS2008 and worked well.

      I got the sql.wce5.armv4.cab and installed into the terminal. I got a message that it is not compatible, and it allow me to install it.
      When I execute the app, I am getting an error:

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

      I guest that I need a new cab for wce7, something like this:  sql.wce7.armv4.cab

      After contacting Microsoft for support on this; they said me that In Windows Embedded Compact 7, SQL CE is distributed with the OS. Is this correct ?.... If so, how can we check in my device if it installed?

       

      If I do cool boot, SQLCE is keeped or removed?

       

      Do you have support for SQLCE on MC9200 device?

       

      Thanks,

      Irma

        • Re: Windows embedded 7.
          Christopher Sather

          Check the OS/BSP level of the MC9290.  Some of the older ones did not have that SQL built in.  Try some of the new ones.

            • Re: Windows embedded 7.
              Irma Rodriguez

              Hi Chris,

               

              Here you have the info of our devices:

              *** System Info. ***

                System: 

                     OS Version: 07.00.2824 

                     OEM Name: Symbol MC92NoG 

                     OEM Version: 03.54.02

                HW Version:  

                     Monitor Ver: 1.21.0000 

                     BLDR Ver: 1.06.0000 

                     Partition Ver: 1.03.0000 

                     EA Ver: 2.54 

                     PLD[0] Ver: 4.08

               

              I am using a laptop with WIN7 32 bits. Windows Mobile Device center (WMDC) Ver: 6.1.6965

               

              Some weeks ago WMDC stop to connect to the device; So I connected as mass storage, then I could copied the cab files and install them.

               

              Yesterday I could not connect it even as mass storage. What could be the problem?

              I did not installed new software to my laptop.

               

              I tried settings on device as following :

                   - Usb client mode and ActiveSync

                   - usb otg mode and  Activesync

                   - Usb client mode and mass storage

                   - usb otg mode and  mass storage

               

              Thanks in advance for your support.

              Irma

            • Re: Windows embedded 7.
              Daniel Silva

              You need SQL CE 3.5.8080 (which is called SP2) or higher.  It looks like you are running something older,  because I think SP2 will show as 3.5.1, not 3.5.0. Check the version of the system.data.sqlserverce.dll that you are referencing.   You might need to actually go to the file in the path where it's being referenced from to get the detailed version number.  VS seems to only say 3.5.1 or 3.5.0.

               

              I think this is the link to the 8080 version.

              Download Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows Mobile from Official Microsoft Download Center

               

              The device comes with 3.5.8154 preloaded.  There have been some instances where that has caused a conflict, but sometimes the 8080 version will work fine.  If you are running 8080 or higher and are still having issues,  you can try using a .reg file to remove references to 8154 and allow you to run whatever version you are building with. See this related post.

              MK3100, Compact 7, and SQLCE 3.5

               

              Another option is to install WEC7 platform builder on your PC and extract the 3.5.8154 dll from there. You could build your project using the 8154 version that comes on the device.  Unfortunately that is a huge download,  but that's the only way I am aware of to get that DLL.

                • Re: Windows embedded 7.
                  Irma Rodriguez

                  Dan,

                   

                  Really thanks for your quick response.

                  I installed the SQLCE SP2 8080 version. The problem was that yesterday I could not test it  on the device because the WMDC sttoped to connect and even I could not connect as mass storage.

                   

                  It is a good idea to install WCE7 on my laptop to complete testing and be sure to build the app with the right version as it is on device.

                  I checked WCE7 download, it is requesting 100GB free on the HD.

                   

                  Maybe that could not be my option.

                   

                  I will try with 8080 version, if not works well;  then I will try with reg file.

                   

                  Thanks,

                    • Re: Windows embedded 7.
                      Irma Rodriguez

                      Hi Dan,

                       

                      I installed SQLCE SP2 8080; removed and added  system.data.sqlclient.dll, and recompiled.

                      Tested on emulator on VS2008 and worked well.

                      Copied the cab file on device MC9200.

                      When I execute the cab file to install app; I receive a message that it is not compatible and it allowed me to install it.

                      When I execute the application I am getting an error:   "Can't find PInvoke dll".

                       

                      Is it not finding the sql ce on device?

                       

                      Thanks,

                        • Re: Windows embedded 7.
                          Daniel Silva

                          The compatibility message is likely because of the the max system version set in your cab file project.  Take a look at that.

                           

                          The pinvoke error might be related to SQLCE or it could be something else. It sounds like something is trying to pinvoke a method in a native DLL that's not on the device.  If you are using the EMDK, are you running a version that's supported on the MC92?  It looks like that would be 2.8 or 2.9.

                           

                          Are you able to debug (or at least deploy) on the device using Visual Studio over Activesync?  That will usually install anything that it detects that's missing on the device (like maybe the 8080 version of SQLCE, the symbol api dlls,  or anything else you have dependencies on).  That would be a good test to see if it runs that way.   VS will copy all of the stuff it deploys to the device in your bin directory, so you might get a hint from that what you need to install for production.

                            • Re: Windows embedded 7.
                              Irma Rodriguez

                              Hi Dan,

                               

                              I verified the version of System.Data.SqlClient.dll from the directory where it is referencing. It has version 3.0.5824.
                              The version for System.Data.SqlServerCe.dll is 3.5.8109.
                              So Sql 3.5 SP2 installed those files.

                              Is SqlCleint.dll version correct for WCE 7?

                               

                              The error about 'Can't find PInvoke.dll' is about "MissingMethodException" on SqlClient.Connection.

                               

                              That's means that System.Data.SqlClient.dll is not installed on Device ?

                               

                              Also I installed the evaluation copy for WCE 7 on my laptop and I did not find System.Data.SqlClient.dll neither sql.cab

                               

                              Thanks,

                              Irma

                                • Re: Windows embedded 7.
                                  Daniel Silva

                                  The projects that I have been working with did not use SqlClient.dll, just SqlServerCe.dll.  It does look like SqlClient hasn't been updated in a long time.  It looks like SqlClient would be what you use to access a database on your back end somewhere,  no database on the device.  Is that what you are trying to do?

                                   

                                  I just built a sample project using SqlClient,  and I see something that might be related to what you're seeing.  I get "Can't find PInvoke DLL 'dbnetlib.dll'.".  I went poking around on the net searching for this error, and I found several posts about this.  Here's one:

                                  http://stackoverflow.com/questions/6856266/get-visual-studio-to-deploy-dbnetlib-dll-on-windows-ce

                                   

                                  I copied the file from C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Devices\Client\wce500\armv4i on my PC to the folder on my device where my .exe is running,  and I no longer get that error.  Can you try that?

                                    • Re: Windows embedded 7.
                                      Irma Rodriguez

                                      Hi Dan,

                                       

                                      Yes, I need remote connection. The DB is on a server.

                                      I included the file dbnetlib.dll into my CAB setup file. Now it is copied to the app directory on installation.

                                       

                                      Now I am getting another error:

                                      File or assembly name 'System.Data.SqlClient, Version=3.0.3600', or one of its dependencies, was not found.

                                      Checking properties of the file from the directory where it is referenced; it shows version = 3.0.5300.

                                       

                                      I tested to add SqlClient reference with the following:

                                      1) Copy Local =YES; Specific Version=Yes

                                      2) Copy Local = NO; Specific Version=Yes

                                      3) Copy Local = No; Specific Version=NO.

                                      4) Copy Local = YES; Specific Version =NO.

                                       

                                      Dependencies of System.Data.SqlClient.dll are:

                                      - System    (Already into references)

                                      - System.Data   (Already into references)

                                      - System.Xml    (Already into references)

                                      - mscorlib    (I am trying to add it and it is not adding to references) - I added in the cab. I thinks I am missing something else in order to could add this reference. Right?

                                       

                                      In all cases I got the same error.

                                       

                                      So; I was thinking the Device MC9200 has not installed the sqlce installed. Then I tried to install it.

                                       

                                      Also I tried to install the following files copied to device from C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Devices\Client\wce500 folder:

                                      - sqlce.dev.enu.ppc.wce5.armv4i.cab

                                      - sqlce.ppc.wce5.armv4i.cab

                                      - sqlce.repl.ppc.wce5.armv4i.cab

                                      When I try to execute ot install it; I am getting error "It is not a compact cab file".

                                       

                                      NOTE: The problem is WMDC stopped to connect with device. Only I could connect as mass storage. Also when we created the app for wce5 we did not have any issue like this on wce7.

                                       

                                      Thanks in advance for your Help.

                                        • Re: Windows embedded 7.
                                          Daniel Silva

                                          I think you need to add System.Data.SqlClient.dll on to the device.  Mine looks like it grabbed the one from C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Devices\Client.

                                           

                                          Also, interesting thing happened to me today.  I could not get my MC92 to connect to WMDC.  Turned out that I had replaced the battery with a really old one I had around.  When I put the original battery back in,  it works again.  Might be worth a try if you had swapped the battery since you had WMDC working.

                                            • Re: Windows embedded 7.
                                              Irma Rodriguez

                                              Hi Dan,

                                               

                                              Really thanks a lot for your support on this. It has been fixed the error.

                                              I added also the Syste,Data.SqlClient.dll on Device and the error gone.

                                               

                                              Regarding connection with WMDC; it is still not connecting. I am using the original battery that device has it.

                                              So I do not understand why suddenly the connection with WMDC stopped.

                                               

                                              Regards,

                                              Irma

                                                • Re: Windows embedded 7.
                                                  Daniel Silva

                                                  Glad that you Sql issue is resolved.

                                                   

                                                  WMDC can be fussy some times.  I usually try using a different USB port on the PC or using a USB hub when I'm having issues.  I have also seen some USB cables that somehow cause issues with it.  There has also been at least one time where I needed to uninstall it from my PC and reinstall it.