The type initializer for 'SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine' threw an exception

Posts   
 
    
jcwc1
User
Posts: 4
Joined: 31-Jan-2008
# Posted on: 31-Jan-2008 11:00:03   

I've created a console application in my dev enironment that uses LLBLGen and want to port the executable to my staging environment. However when i invoke my application in the staging area, i keep getting the error "The type initializer for 'SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine' threw an exception" when i am referencing any LLBLGen method.

All i have done is copy all the files within the bin directory of my dev environment into my staging environment and fire the .exe to see if this is working. It works fine when i invoke the .exe in my dev environment but not on staging.

Within my bin directory contains the , My .exe alongwith the .exe.config file LLLBLGen.dll, SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll, SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll

Does anybody know what i am doing wrong here?? Could it be that i am not referencing the LLBLGen binaries correctly? Any help would be much appreciated.

cheers

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 31-Jan-2008 11:07:22   

In the config file, do you have the connectionString correctly set to an accessible database.

jcwc1
User
Posts: 4
Joined: 31-Jan-2008
# Posted on: 31-Jan-2008 11:09:41   

Walaa wrote:

In the config file, do you have the connectionString correctly set to an accessible database.

Yes the connection string is set correctly because the dev environment runs fine.

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 31-Jan-2008 11:14:02   

Alright but when it is copied to the staging server, does it still point to the development database?

jcwc1
User
Posts: 4
Joined: 31-Jan-2008
# Posted on: 31-Jan-2008 11:25:43   

Walaa wrote:

Alright but when it is copied to the staging server, does it still point to the development database?

i forgot to add, the connection string in the dev environment already points to the staging database so when i port over to the staging area, i don't have to make any changes.

Not sure if this can help but the llblgen.dll's are built against the dev database which have a different name to the staging database so i've set up the config as follows:

<configuration> <configSections> <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler"/> </configSections>

<sqlServerCatalogNameOverwrites>
    <add key="NESV1" value="NESv0.2.0"/>
</sqlServerCatalogNameOverwrites>
<connectionStrings>
    <add name="PrimaryConnection" connectionString="Data Source=4mat-staging-a; Initial Catalog=NESv0.2.0; User Id=gdsg; Password=sdgsdg; Connection Timeout=60" />
</connectionStrings>
<appSettings>
    <add key="PhysicalLogPath" value="D:\DV3Match\"/>
</appSettings>

</configuration>

jcwc1
User
Posts: 4
Joined: 31-Jan-2008
# Posted on: 31-Jan-2008 14:01:06   

i've realised why this is happenin now...

i was firing the .exe in the staging area from the dev machine, not loggin into the staging machine hence it was failing.

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 31-Jan-2008 14:28:03   

Glad you have found it. simple_smile