locked
Error TypeLoadException when trying to connect to MySQL Database RRS feed

  • Question

  • Hey I am very new to developing on Windows CE 6.0. The device is a Motorola MC9190 (Barcode Scanner/Pocket PC).

    I currently have a project set up in VS2008 Pro. However, when I try to deploy, I get the error:

    Error 1 Post-deploy error 0x00000001 returned after calling '\Windows\wceload.exe /noui \Windows\NETCFv35.Messages.EN.wm.cab'. Device Connectivity Component

    When I run the program anyways, it gets stuck on the line of code which connects the device to an SQL server and inserts data into the server. This is the error I get:

    TypeLoadException was unhandled
    File or assembly name 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089', or one of its dependencies, was not found.

    Thanks for the help. 

     
    Wednesday, February 12, 2014 4:01 PM

Answers

  • No, that is not possible for the very same reason - there's no desktop framework on Windows CE. Whatever your app is a console or GUI or anything else does not change that.

    You can run your console application on the desktop though and connect to it via TCP/IP from the device. That is essentially the same solution as web service, only harder.

    I'm not actually suggesting you host the database on the device. It won't help you anyways unless you have a proper device compatible data adapter for the specific database.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Eileen ni Monday, March 3, 2014 8:07 AM
    Thursday, February 13, 2014 7:50 PM

All replies

  • You must be using desktop MySQL data adapter. That won't work as it needs desktop framework.

    Use device compatible version if available. If not then you cannot connect to MySQL directly and would need to use some kind of proxy, e.g. web service wrapper.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, February 12, 2014 9:32 PM
  • You have been responding to almost all my posts, and I'd like to say thanks so much for that, you've been a great help!

    I am really new to this, so how would I go about using a devise compatible version or a web service wrapper? (Going to google that right now).

    Would it be a better idea to use a Microsoft SQL server for the database instead then?

    Thursday, February 13, 2014 3:58 PM
  • For databases besides SQL Server (remote) and SQL Server CE (local) your options on devices are rather limited.

    Database manufacturers usually don't produce device compatible adapters, so you would need to look for a 3rd party solution. Even if there's one that may get expensive. There may be some open source projects as well.

    Web service wrapper is super simple: just add a web site with an API which accepts query from device, loads data from the database using desktop adapter and returns this data to the device. These articles would give you an idea in how this can done:

    http://msdn.microsoft.com/en-us/library/aa446547.aspx

    http://msdn.microsoft.com/en-us/library/8wbhsy70(v=vs.90).aspx

    Since SQL Server has a device compatible ADO.Net adapter that would just work.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, February 13, 2014 5:13 PM
  • Is it possible then, to create a console application with the MySql references, and then run it on my Windows CE device? I don't want the database to be hosted on the device itself, rather on another computer through the network. 
    Thursday, February 13, 2014 6:04 PM
  • No, that is not possible for the very same reason - there's no desktop framework on Windows CE. Whatever your app is a console or GUI or anything else does not change that.

    You can run your console application on the desktop though and connect to it via TCP/IP from the device. That is essentially the same solution as web service, only harder.

    I'm not actually suggesting you host the database on the device. It won't help you anyways unless you have a proper device compatible data adapter for the specific database.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Eileen ni Monday, March 3, 2014 8:07 AM
    Thursday, February 13, 2014 7:50 PM