Adding License Manually - please clarify
Adding License Manually - please clarify
Seems like I have things working (my read statement works), but I get a license error when I run my application. I have looked at your instructions but will need some additional help please.
Adding License Manually
Create a file named licenses.licx, if this file does not exists yet.
1. where do I create this file? Where would it exist if it did?
Open the file with a text editor and place this line inside:
CoreLab.MySql.MySqlConnection, CoreLab.MySql
2. ok, easy enough
Save the file and add it to your project.
3. How do I add it to my project? where, how?
Make sure it is embedded as a resource. To do this, in Visual Studio .NET view properties of the file and check that Build Action is set to Embedded Resource.
4. If I do steps 1-3 will it be embedded as a resource? Is something eles required?
many thanks!
Adding License Manually
Create a file named licenses.licx, if this file does not exists yet.
1. where do I create this file? Where would it exist if it did?
Open the file with a text editor and place this line inside:
CoreLab.MySql.MySqlConnection, CoreLab.MySql
2. ok, easy enough
Save the file and add it to your project.
3. How do I add it to my project? where, how?
Make sure it is embedded as a resource. To do this, in Visual Studio .NET view properties of the file and check that Build Action is set to Embedded Resource.
4. If I do steps 1-3 will it be embedded as a resource? Is something eles required?
many thanks!
Create it in the main folder of your application, near Program.cs file. If it exists you may find it using windows search.1. where do I create this file? Where would it exist if it did?
Agree2. ok, easy enough
Click Project-->Add Existing Item... submenu and then choose the file from the dialog window.3. How do I add it to my project? where, how?
Commonly that will do. If not, inform us providing full version of Visual Studio you use (Professional, Standard?); your hardware architecture; version of MySQLDirect .NET (Std, Pro, Mobile); type of the project you create (class library, executable application, web project, web project with dynamically compiled sources).4. If I do steps 1-3 will it be embedded as a resource? Is something eles required?
This did not work for me.
Hello all,
I attempted to follow the aforementioned steps and i still get the "License not found. ..." message.
I have a Managed C++ .NET Solution which contains 2 projects. I am compiling the solution in debug mode.
The Solution is called TestDataLoader.
One project is called DataEngine.
The second project is called DataLoader.
I have copied the Licenses.licx from the examples directory to the Solution directory as well as each Project directory. I have tried adding the license.licx file to one / both projects as well as the Solution using Project->Add Existing Item... Currently the licenses.licx file has been added to both projects and Solution with no success.
Please help because I know the clock is running on the Trail period.
Regards,
Ski
I attempted to follow the aforementioned steps and i still get the "License not found. ..." message.
I have a Managed C++ .NET Solution which contains 2 projects. I am compiling the solution in debug mode.
The Solution is called TestDataLoader.
One project is called DataEngine.
The second project is called DataLoader.
I have copied the Licenses.licx from the examples directory to the Solution directory as well as each Project directory. I have tried adding the license.licx file to one / both projects as well as the Solution using Project->Add Existing Item... Currently the licenses.licx file has been added to both projects and Solution with no success.
Please help because I know the clock is running on the Trail period.
Regards,
Ski
Additional Information
The project is a simple Windows Forms (.exe) application created with VS 2003 Pro C++.NET. No network stuff included, just a local app on an isolated machine. MySql database is 5.0.15.
Computer is a dual 3.2 gig XEON Compaq box with 2 gigs of RAM and WINDOWS XP PRO.
In the Projects I am adding a reference to the CoreLab.Mysql and then adding "using namespace CoreLab::MySql;" in the header files.
I have removed the reference to MySql.Data and the "using namespace MySql::Data::MySqlClient" from the header files.
Regards,
Ski
Computer is a dual 3.2 gig XEON Compaq box with 2 gigs of RAM and WINDOWS XP PRO.
In the Projects I am adding a reference to the CoreLab.Mysql and then adding "using namespace CoreLab::MySql;" in the header files.
I have removed the reference to MySql.Data and the "using namespace MySql::Data::MySqlClient" from the header files.
Regards,
Ski
It is known VC++ issue. Please take a look to the appropriate forum topic:
http://crlab.com/forums/viewtopic.php?p=14367.
http://crlab.com/forums/viewtopic.php?p=14367.
So where does DbTable.exe.licenses come from?
It is still not clear to me from the other post.
I found the line /ASSEMBLYRESOURCE:Debug\DbTable.exe.licenses in the other post, but where exactly does "DbTable.exe.licenses" come from? Please provide some more explanation
2 days and counting on the trial period.
Regards,
Gary Slovikosky
I found the line /ASSEMBLYRESOURCE:Debug\DbTable.exe.licenses in the other post, but where exactly does "DbTable.exe.licenses" come from? Please provide some more explanation
2 days and counting on the trial period.
Regards,
Gary Slovikosky
This describes how to compile the required resource manually.
Generate licensing resource file using following command line:
"%Compiler Path%\lc.exe" /target:MyApplication.exe /complist:licenses.licx /i:"%Assembly Path%\CoreLab.MySql.dll"
Where %Compiler Path% is a path to appropriate lc.exe file (for example, C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin in case of .NET Framework 1.1);
MyApplication.exe is name of your target executable file;
licenses.licx is a text file described earlier in this topic;
%Assembly Path% is location of CoreLab.MySql.dll assembly
Substitute these arguments with actual values. If license compiler fails with error, try adding full assembly specification to licenses.licx file, for example:
CoreLab.MySql.MySqlConnection, CoreLab.MySql, Version=3.50.12.0, Culture=neutral, PublicKeyToken=09af7300eec23701
License compiler will generate 'MyApplication.exe.licenses' resource file. You should add this file to your project as embedded resource (as described in another post).
Generate licensing resource file using following command line:
"%Compiler Path%\lc.exe" /target:MyApplication.exe /complist:licenses.licx /i:"%Assembly Path%\CoreLab.MySql.dll"
Where %Compiler Path% is a path to appropriate lc.exe file (for example, C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin in case of .NET Framework 1.1);
MyApplication.exe is name of your target executable file;
licenses.licx is a text file described earlier in this topic;
%Assembly Path% is location of CoreLab.MySql.dll assembly
Substitute these arguments with actual values. If license compiler fails with error, try adding full assembly specification to licenses.licx file, for example:
CoreLab.MySql.MySqlConnection, CoreLab.MySql, Version=3.50.12.0, Culture=neutral, PublicKeyToken=09af7300eec23701
License compiler will generate 'MyApplication.exe.licenses' resource file. You should add this file to your project as embedded resource (as described in another post).
I still get the same error message
One more time,
I was able to create the MyApplication.exe.licenses file and add it to the application, but I still get the same message "License not found. ...".
I did have to add the Version=3.50.12 ... etc, etc information for it to work.
I was wondering if the problem may be in the fact that the license file is added to the main application, but most of my data access happens in a class which is compiled as a library file and linked in. I also added it into the librarian command line but I get the same error.
The code is like this
IDbConnection * ClassConnection ;
// later ....
IDbConnection * GetConnection(String * ConnectionString)
{
switch(ClassRequestedType) // equals MySQL enumerator
{
case ORACLE : return new OracleConnection(ConnectionString) ;
case SQL : return new SqlConnection(ConnectionString) ;
case MySQL : return new CoreLab::MySql::MySqlConnection(ConnectionString) ;
}
}
// later ...
this->ClassConnection = this->GetConnection(ConnectionString)
this->ClassConnection->Open() ;
I cannot send any more code than this because of business restrictions.
3rd day since start of trial and still trying...
Regards,
Gary Slovikosky
I was able to create the MyApplication.exe.licenses file and add it to the application, but I still get the same message "License not found. ...".
I did have to add the Version=3.50.12 ... etc, etc information for it to work.
I was wondering if the problem may be in the fact that the license file is added to the main application, but most of my data access happens in a class which is compiled as a library file and linked in. I also added it into the librarian command line but I get the same error.
The code is like this
IDbConnection * ClassConnection ;
// later ....
IDbConnection * GetConnection(String * ConnectionString)
{
switch(ClassRequestedType) // equals MySQL enumerator
{
case ORACLE : return new OracleConnection(ConnectionString) ;
case SQL : return new SqlConnection(ConnectionString) ;
case MySQL : return new CoreLab::MySql::MySqlConnection(ConnectionString) ;
}
}
// later ...
this->ClassConnection = this->GetConnection(ConnectionString)
this->ClassConnection->Open() ;
I cannot send any more code than this because of business restrictions.
3rd day since start of trial and still trying...
Regards,
Gary Slovikosky
This does not work
I have tried to follow the directions in the on-line CoreLab help. It does not work. There is constant reference to "Embedded Resource" but I can find no place to do this.
When I add the file (either licenses.licx or exe.licences or MyApplication.exe.licenses) to my solution, or my main Windows Forms application, or to my library in the solution, I right click it, select ->Properties, the dialog box has no mention of "Embedded Resource".
Visual Studio .NET 2003 also has no reference to "Embedded Resources". I have searched under Embedded, Resources and Embedded Resources.
4 days and counting until the end of the Trail period and it still will not run!
Gary Slovikosky
When I add the file (either licenses.licx or exe.licences or MyApplication.exe.licenses) to my solution, or my main Windows Forms application, or to my library in the solution, I right click it, select ->Properties, the dialog box has no mention of "Embedded Resource".
Visual Studio .NET 2003 also has no reference to "Embedded Resources". I have searched under Embedded, Resources and Embedded Resources.
4 days and counting until the end of the Trail period and it still will not run!
Gary Slovikosky
Try to do the following:
1. Create a new project.
2. Add one connection component.
3. Compile license resource manually (as it was described) and add it to the project.
4. Right-click the project, select properties, go to the Linker/Command Line option, enter appropriate string (like
/ASSEMBLYRESOURCE:Debug\DbTable.exe.licenses).
5. Add connection->Open() call to the code.
6. Run the project.
7. Inform me on results.
1. Create a new project.
2. Add one connection component.
3. Compile license resource manually (as it was described) and add it to the project.
4. Right-click the project, select properties, go to the Linker/Command Line option, enter appropriate string (like
/ASSEMBLYRESOURCE:Debug\DbTable.exe.licenses).
5. Add connection->Open() call to the code.
6. Run the project.
7. Inform me on results.
Still does not work
I did exactly as you requested and it still did not work.
I did the following steps:
1. Created a C++ .NET (2003) Windows forms Application (CoreLab)
2. Added a MySqlConnection object to the form ( shows as mySqlConnection1)
3. Added one command button (button1) to run the app.
4. Compiled the application to create an EXE.
5. Created the CoreLab.exe.licenses file in the Debug directory
6. Added the /ASSEMBLYRESOURCE:Debug\CoreLab.exe.licenses file into the Linker\Command Line\Additional Options.
7. added mySqlConnnection1->Open() ; to the code two different ways.
A: Tried selecting the mySqlConnection1 object and set the properties for database, username, password directly.
try
{
mySqlConnection1->Open() ;
}
catch (CoreLab::MySql::MySqlException * ex)
{
MessageBox::Show(ex->Message->ToString()) ;
}
B: Tried adding the following code
try
{
CoreLab::MySql::MySqlConnection * conn = new CoreLab::MySql::MySqlConnection(S"Database=MyDB;User Id=MyID; Password=MyPW") ;
conn->open() ;
}
catch (CoreLab::MySql::MySqlException * ex)
{
MessageBox::Show(ex->Message->ToString()) ;
}
I still get the error message "License not found. Please view "Licensing" topic in ....." with both attemtps
Regards,
Ski
I did the following steps:
1. Created a C++ .NET (2003) Windows forms Application (CoreLab)
2. Added a MySqlConnection object to the form ( shows as mySqlConnection1)
3. Added one command button (button1) to run the app.
4. Compiled the application to create an EXE.
5. Created the CoreLab.exe.licenses file in the Debug directory
6. Added the /ASSEMBLYRESOURCE:Debug\CoreLab.exe.licenses file into the Linker\Command Line\Additional Options.
7. added mySqlConnnection1->Open() ; to the code two different ways.
A: Tried selecting the mySqlConnection1 object and set the properties for database, username, password directly.
try
{
mySqlConnection1->Open() ;
}
catch (CoreLab::MySql::MySqlException * ex)
{
MessageBox::Show(ex->Message->ToString()) ;
}
B: Tried adding the following code
try
{
CoreLab::MySql::MySqlConnection * conn = new CoreLab::MySql::MySqlConnection(S"Database=MyDB;User Id=MyID; Password=MyPW") ;
conn->open() ;
}
catch (CoreLab::MySql::MySqlException * ex)
{
MessageBox::Show(ex->Message->ToString()) ;
}
I still get the error message "License not found. Please view "Licensing" topic in ....." with both attemtps
Regards,
Ski
That didn't work for me
dghundt,
I did exactly that in Step 2 of my previous post.
I set the parameters in the Properties Page for Username, Password, Server, Database. I still got the "License error".
Did you use C++.NET or C# or VB.NET?
Regards,
Ski
I did exactly that in Step 2 of my previous post.
I set the parameters in the Properties Page for Username, Password, Server, Database. I still got the "License error".
Did you use C++.NET or C# or VB.NET?
Regards,
Ski