Catalog Name Overwrites

Posts   
 
    
tprohas
User
Posts: 257
Joined: 23-Mar-2004
# Posted on: 20-Jul-2005 00:24:25   

I had posted this to another thread, and now have decided to start a new one. I have the catalog name overwrites working and am seeing that it doesn't work with the typed lists and typed views. Is there something else I can do to make the lists and views use the new catalog name?

Here is the web.config file that I'm using for this.


<add key="CatalogNameUsageSetting" value="1"/>
<add key="CatalogNameToUse" value="NewDatabaseName"/>

I have a little more info to add here. I now have tried using this code.


    <configSections>
        <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueFileSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    </configSections>
    
    <sqlServerCatalogNameOverwrites>
        <add key="WS2" value="WS2_071405"/>
    </sqlServerCatalogNameOverwrites>

This also works only with entities and not with lists or views. Are the list and view catalog names hard coded and can't be over written?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 20-Jul-2005 10:26:08   

Please specify if you're using adapter or selfservicing. I assume you're using adapter, as you tried adapter specific settings first.

The name overwriting section in the config file (the name-value pairs) are read by the DQE and every query uses them, as they're used by the routine to create an object name (table/view name).

It works ok here both for view and typedlist., so I'm a bit puzzled what can be the problem. The first name is the name that's NOW in the generated code (with the same casing), in your case 'WS2'. The second name is the name it has to become, 'WS2_071405'.

This is thus done ONLY for the catalog 'WS2'. If the typedlist entities are in another catalog or the views are in another catalog in your project, these names won't be overwritten.

Please check this with a DQE trace enabled.

Frans Bouma | Lead developer LLBLGen Pro
tprohas
User
Posts: 257
Joined: 23-Mar-2004
# Posted on: 20-Jul-2005 19:06:41   

Otis,

I guess this was the answer I needed as it lead me to the problem. I had the fully qualifed database name being used in my view so even when I over wrote the name it still used databasename.dbo.tablename in the view.

thank you.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 20-Jul-2005 19:13:08   

Glad it's solved simple_smile

Frans Bouma | Lead developer LLBLGen Pro