Multi Connection String and Self-Service

Posts   
 
    
d.laux
User
Posts: 4
Joined: 07-Sep-2008
# Posted on: 07-Sep-2008 09:40:31   

Hello,

if have modified the app.config it does not work (sql 2005) / (Thread 13082)

the sql query in exeption is QueryExecuted=" Query: SELECT [FSV].[dbo].[Grundlagen].[id]

what do i wrong ?

Thank's Dietmar

LHS.FSVM.OR.HelperClasses.DbUtils.ActualConnectionString = "Data Source=DLX10\V2005;Initial Catalog=FSV-dev;Integrated Security=True " in my code

app.config

<configuration>
    <configSections>
        <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" />
    </configSections>
    <sqlServerCatalogNameOverwrites>
        <add key="FSV" value="" />
    </sqlServerCatalogNameOverwrites>
    <appSettings>
        <add key="Main.ConnectionString1" value="data source=dlx10\lhs;initial catalog=FSV;integrated security=SSPI;persist security info=False;packet size=4096"/>
    </appSettings>
</configuration>
Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 08-Sep-2008 10:39:43   

Which LLBLGen Pro runitme library version are you using?

d.laux
User
Posts: 4
Joined: 07-Sep-2008
# Posted on: 08-Sep-2008 10:57:05   

Hello Walaa,

SD.LLBLGen.Pro.DQE.SqlServer.NET20 v2.0.50727 SD.LLBLGen.Pro.ORMSupportClasses.NET20 v2.0.50727

thanks Dietmar

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 08-Sep-2008 11:15:31   

This is not a correct RTL version number.

The runtime library version is obtainable by rightclicking the SD.LLBLGen.Pro.ORMSupportClasses.NETxy.dll in windows explorer and then by selecting properties and the version tab. The version is then enlisted at the top as the fileversion. It has the typical format as 2.0.0.YYMMDD, or starting in 2007, the format 2.0.YY.MMDD

d.laux
User
Posts: 4
Joined: 07-Sep-2008
# Posted on: 08-Sep-2008 11:37:42   

SD.LLBLGen.Pro.ORMSupportClasses.NET20 2.5.08.0109

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 08-Sep-2008 11:51:43   

I think what happens is that the catalog name from the connection string specified in the config file is used (since you have specified an empty string as the new catalog name in the sqlServerCatalogNameOverwrites).

And this doesn't get overwritten by the connection string specified in code.

So your options are: 1- Specify "FSV-dev" as the new catalog name in the sqlServerCatalogNameOverwrites.

OR

2- Specify "FSV-dev" in the connection string in the config file

OR

3- If you need the catalog name to be set dynamically in code, then only remove the connection string from the config file.

d.laux
User
Posts: 4
Joined: 07-Sep-2008
# Posted on: 08-Sep-2008 12:24:48   

i have moved the app.config from llbl proj to the main Proj -> it works

thanks Dietmar

<?xml version="1.0"?> <configuration> <configSections> <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" /> </configSections> <sqlServerCatalogNameOverwrites> <add key="FSV" value="" /> </sqlServerCatalogNameOverwrites> </configuration>