Hi
The standard for my company is to have different catalog names for the same database in different environments. Eg the database will be F121DEV in development and F121UAT in acceptance.
I have gone through the docco and found the Sql server catalog name overwrites and have set up my config as below.
<configSections>
<section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueFileSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<sqlServerCatalogNameOverwrites>
<add key="Catalog" value="Form121Dev" />
</sqlServerCatalogNameOverwrites>
I get the name of the catalog from the config file and assign to a static variable.
I am using the DataAccessAdapter and was trying to use the constructor like below:
DataAccessAdapter tempfieldstaffadapter = new DataAccessAdapter();
tempfieldstaffadapter.CatalogNameUsageSetting = CatalogNameUsage.ForceName;
tempfieldstaffadapter.CatalogNameToUse = strCatalog.ToString().Trim();
This isn't working. Do you have examples of the best way to use the dataaccessadapter contructor to do this.
Or am I doing it completely wrong.
thanks
Rell