Welcome Guest Search | Active Topics | Log In | Register

VistaDB Licenses.licx, LINQPad, Mindscape LightSpeed, .dll project Options
11664
#1 Posted : Monday, February 08, 2010 7:10:14 PM
Rank: Member

Groups: Member

Joined: 6/13/2009
Posts: 14
Points: 32
Location: College Place, WA
I am attempting to use VistaDB with Mindscape LightSpeed in the LINQPad tool.

1. I have a small DLL project that contains the LightSpeed Model attached to a VistaDB4 database.

2. I have used the .LPX file provided by Mindscape in their forum to make a connection through LINQPad to a LightSpeed model that is attached to a VistaDB4 database.

3. The Mindscape LightSpeed model does now appear in the connections panel of LINQPad with the various tables exposed.

4. When I run a query, I get the VistaDBException: You must have a valid license to use VistaDB.

5. I have copied the licenses.licx file from the VistaDB install directory and have added it in the properties section of the MS Visual Studio solution for this project. The "Build Action" parameter in the licenses.licx file is set to "Embedded Resource."

6. The project builds successfully.

Yet, the LINQPad execution of the query fails because of a "missing" license.

Is there something else I need to do to get the licenses.licx to be active in this .DLL that contains only a Mindscape.LightSpeed model? (This is a .dll project and not an .exe project because LINQPad needs to connect to a dll that contains the LightSpeed model).

Thank you

Kenneth James
js_vistadb
#2 Posted : Thursday, February 11, 2010 4:45:41 PM
Rank: VistaDB Staff

Groups: Administration, VistaDB Staff

Joined: 8/13/2006
Posts: 3,633
Points: 5,124
Location: Mount Dora, Florida
Read the help file topic "Third Party Tools that require VistaDB design licenses"

You have to add an entry to your app.config of Linqpad. Microsoft runtime licenses are not compiled into dll's, only executables.

So you can either flag the dll to use the machine default design time license (your developer license): See help topic "Designtime License Usage"

In an app.config:

Code:

<appSettings>
   <add key="VistaDBUseDesignTimeLicense" value="true"/>
</appSettings>


Or you can flag the assembly at compile time using the Help Topic "Set Design Time using Assembly Attribute Method".

Code:

[assembly: VistaDB.UseVistaDBDesignTimeLicense]


Put that in your assemblyinfo file.


Quote:
(This is a .dll project and not an .exe project because LINQPad needs to connect to a dll that contains the LightSpeed model).


The exe has to be the licensed part. So either you add the app.config entry, or tell the dll to just use the developer license through the design time setting.

The main help topic is "VistaDB Licensing". It covers a LOT of scenarios.

Jason Short

11664
#3 Posted : Thursday, February 11, 2010 9:54:34 PM
Rank: Member

Groups: Member

Joined: 6/13/2009
Posts: 14
Points: 32
Location: College Place, WA
Thank you for your advice. I must admit I had forgotten about the help file. I now remember you referring to that topic in previous threads in days gone by.

To help other newbies to all of this, I mis-understood your sentence

Quote:
You have to add an entry to your app.config of Linqpad.


to mean that LINQPad had to compile that into their executable.

With the help of Al Albarhari of LINQPad, I now realize that it only takes a LINQPad.config file with that VistaDB license information in my LINQPad executable directory.

Now it works like a charm. Being able to use Mindscape LightSpeed with VistaDB enhances my learning immensely.

Thank you all.

Kenneth James
js_vistadb
#4 Posted : Friday, February 12, 2010 12:35:02 PM
Rank: VistaDB Staff

Groups: Administration, VistaDB Staff

Joined: 8/13/2006
Posts: 3,633
Points: 5,124
Location: Mount Dora, Florida
Quote:
Quote:
You have to add an entry to your app.config of Linqpad.


to mean that LINQPad had to compile that into their executable.


Yes, that would be a source of confusion. Any .Net application can have a app.config to configure items in the application settings. Even if the developer didn't include one, you can add one and when .Net launched the app it will use the default settings automatically.

And yes, the app.config has to be the same name as the executable. When you add it to Visual Studio for your application you add an app.config. But the compiler then renames it to the application.exe.config in the output directory. It is a confusing thing for them to do "for" you.

So if you have an executable named Linqpad.exe, then you create a file called Linqpad.exe.config and add the entries (maybe you don't see the EXE because you have hide known extensions in your explorer window).

Quote:
Being able to use Mindscape LightSpeed with VistaDB enhances my learning immensely.


Yes, Linqpad rocks! Applause I love it. Being able to write and test LINQ queries in Linqpad probably shaved weeks off my learning curve for LINQ. It was still frustrating (and sometimes still is), but Linqpad makes it so much easier to see what is happening.

I have posted here in the forums about Linqpad, but I don't know if I included the app.config. I should probably add that to the help file (yes, we really do have one! Shhh ).

Jason Short

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.073 seconds.