Connect to MySQL from a Windows CE 7 embedded application

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
riahc3
Posts: 5
Joined: Mon 19 May 2014 10:11

Connect to MySQL from a Windows CE 7 embedded application

Post by riahc3 » Mon 19 May 2014 10:14

Im trying to connect from a Windows Embedded Compact 7 embedded application to a remote MySQL Server. I wanted to know if this provider would work correctly.

Thank you

riahc3
Posts: 5
Joined: Mon 19 May 2014 10:11

Re: Connect to MySQL from a Windows CE 7 embedded application

Post by riahc3 » Mon 19 May 2014 11:07

It seems to sort of work but the trial does not let me make a connection? A error pops up saying that it is not licensed. Does the trial have some limitation?

riahc3
Posts: 5
Joined: Mon 19 May 2014 10:11

Re: Connect to MySQL from a Windows CE 7 embedded application

Post by riahc3 » Mon 19 May 2014 11:42

Maybe I need to manually comply the license from what I see?

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Connect to MySQL from a Windows CE 7 embedded application

Post by Pinturiccio » Tue 20 May 2014 10:37

dotConnect for MySQL has two types of license:
1. The license for using dotConnect for MySQL. This license type is related to purchasing the licensed version and is not related to the described issue. For more information, please refer to http://www.devart.com/dotconnect/mysql/ ... ering.html

2. The technical license of Microsoft .NET Framework. Regardless of the used version - trial or licensed, when you create an application that uses Devart assemblies, it must have a license resource. License information is a specially formed embedded resource. It is checked when a connection is opened. For more information, please refer to http://www.devart.com/dotconnect/mysql/ ... nsing.html

dotConnect for MySQL Mobile edition adds the license resource automatically every time the project is compiled, and usually you don't need to worry about adding it. If the license resource is not automatically added - it can be caused by the following reasons:
1) Visual Studio version is not supported by dotConnect for MySQL. dotConnect for MySQL Mobile supports Visual Studio 2008;
2) You have installed dotConnect for MySQL without the Visual Studio integration setting. Please make sure that the Visual Studio integration check box is selected when installing dotConnenct for MySQL Mobile.

If the license resource is not added automatically to the project, you can compile it with .NET Compact Framework Compiler.

We will send you .NET Compact Framework Compiler via email.
Instructions how to use the license compiler:
1) run this command (replace MyApp.exe with the name of your application)
CrLc.exe /target:MyApp.exe
The output file is Devart.Data.MySql.licenses . Now it can be used only with a particular assembly (MyApp.exe in our sample).
2) put Devart.Data.MySql.licenses to the root folder of your project, add it to the project and set its "Build action" property to EmbeddedResource. Rebuild your project. Now MyApp.exe can be deployed on your mobile device (with Devart.Data.MySql.dll).

Also, there is a known problem with the .NET Compact Framework. A "License not found" exception can be thrown by MySqlDataAdapter.Fill method in case when MySqlConnection had never been opened. To avoid the problem just open (or open and close) any connection before calling the MySqlDataAdapter.Fill method.

riahc3
Posts: 5
Joined: Mon 19 May 2014 10:11

Re: Connect to MySQL from a Windows CE 7 embedded application

Post by riahc3 » Tue 20 May 2014 10:49

Pinturiccio wrote:dotConnect for MySQL has two types of license:
1. The license for using dotConnect for MySQL. This license type is related to purchasing the licensed version and is not related to the described issue. For more information, please refer to http://www.devart.com/dotconnect/mysql/ ... ering.html

2. The technical license of Microsoft .NET Framework. Regardless of the used version - trial or licensed, when you create an application that uses Devart assemblies, it must have a license resource. License information is a specially formed embedded resource. It is checked when a connection is opened. For more information, please refer to http://www.devart.com/dotconnect/mysql/ ... nsing.html

dotConnect for MySQL Mobile edition adds the license resource automatically every time the project is compiled, and usually you don't need to worry about adding it. If the license resource is not automatically added - it can be caused by the following reasons:
1) Visual Studio version is not supported by dotConnect for MySQL. dotConnect for MySQL Mobile supports Visual Studio 2008;
2) You have installed dotConnect for MySQL without the Visual Studio integration setting. Please make sure that the Visual Studio integration check box is selected when installing dotConnenct for MySQL Mobile.

If the license resource is not added automatically to the project, you can compile it with .NET Compact Framework Compiler.

We will send you .NET Compact Framework Compiler via email.
Instructions how to use the license compiler:
1) run this command (replace MyApp.exe with the name of your application)
CrLc.exe /target:MyApp.exe
The output file is Devart.Data.MySql.licenses . Now it can be used only with a particular assembly (MyApp.exe in our sample).
2) put Devart.Data.MySql.licenses to the root folder of your project, add it to the project and set its "Build action" property to EmbeddedResource. Rebuild your project. Now MyApp.exe can be deployed on your mobile device (with Devart.Data.MySql.dll).

Also, there is a known problem with the .NET Compact Framework. A "License not found" exception can be thrown by MySqlDataAdapter.Fill method in case when MySqlConnection had never been opened. To avoid the problem just open (or open and close) any connection before calling the MySqlDataAdapter.Fill method.
I do not use VS at all, nor do I use Mono. Isnt there a way to manually install the license along side a already complied program? I cannot comply it with a resource AFAIK.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Connect to MySQL from a Windows CE 7 embedded application

Post by Pinturiccio » Tue 20 May 2014 15:55

dotConnect for MySQL Mobile can't be installed on Mono. As you can't install dotConnect for MySQL on Mono, you will have to build the license resource manually on a Windows computer, and then copy it to the Mono computer and attach it to your project as an embedded resource.
For more information, please refer to http://www.devart.com/dotconnect/mysql/ ... .html#mono

You must compile the license resource on a computer with Windows and dotConnect for MySQL Mobile installed. After this, add the result Devart.Data.MySql.licenses file to your project on Mono.

We have described how to compile the license resource above.
Pinturiccio wrote:Instructions how to use the license compiler:
1) run this command (replace MyApp.exe with the name of your application)
CrLc.exe /target:MyApp.exe
The output file is Devart.Data.MySql.licenses . Now it can be used only with a particular assembly (MyApp.exe in our sample).
2) put Devart.Data.MySql.licenses to the root folder of your project, add it to the project and set its "Build action" property to EmbeddedResource. Rebuild your project. Now MyApp.exe can be deployed on your mobile device (with Devart.Data.MySql.dll).
We have also sent you .NET Compact Framework Compiler. This .NET Compact Framework Compiler is to be used for dotConnect for MySQL Mobile Trial. If you are going to buy a licensed version of dotConnect for MySQL Mobile, you will need the .NET Compact Framework Compiler for the licensed version. Contact our support team to get the .NET Compact Framework Compiler for the licensed version.

riahc3
Posts: 5
Joined: Mon 19 May 2014 10:11

Re: Connect to MySQL from a Windows CE 7 embedded application

Post by riahc3 » Tue 20 May 2014 16:23

I must comment that email support is terrible and my lasting impression from Devart is not positive at all. I really believe that email support for potentionally buy a product should be much better.

Like I mentioned in my previous post, I do not use Mono or VS. I am using Indusoft Web Studio. I need to add this license directly to the DLL without having a project of any sort (to a already complied application)

How can I do this?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Connect to MySQL from a Windows CE 7 embedded application

Post by Shalex » Wed 21 May 2014 14:44

riahc3 wrote:I must comment that email support is terrible and my lasting impression from Devart is not positive at all. I really believe that email support for potentionally buy a product should be much better.
Our support has a two business day response policy: http://www.devart.com/dotconnect/mysql/ ... pport.html.
riahc3 wrote:Like I mentioned in my previous post, I do not use Mono or VS. I am using Indusoft Web Studio. I need to add this license directly to the DLL without having a project of any sort (to a already complied application)
dotConnect for MySQL uses .NET component licensing. This is the way how Microsoft recommends to do that.

You have generated the license resource successfully with .NET Compact Framework Compiler provided to you by email, haven't you?

Taking into account the fact that you don't control the process of compilation and cannot add the generated license resource to the output assembly as embedded resource, you should look for any standard (by Microsoft) or third-party solution which allows to add a resource to an already complied assembly. This question exceeds the goals of our support because it is not provider specific. JIC: Google search finds http://reflexil.net/ (but we didn't test it) which may help you with your task.

Post Reply