Thursday, March 22, 2012
AppSettings with Report Designer?
It works fine on the Report Server (where I put them in web.config), but I
would like it to work in Visual Studio as well.
I have developed an Data Extension Provider to get data from a Business
tier, instead of directly from a database. The Business tier calls a Data
tier, which needs the connectionstring from appsettings. (I cannot change
this behaviour.)
Regards MaranI solved it.
Put the appsettings in Visual Studio's "devenv.exe.config" and they are read
by the IDE and can be used in Report Designer by the Data Extension.
**********************
"Maran" wrote:
> Where do I put appsettings for Report Designer?
> It works fine on the Report Server (where I put them in web.config), but I
> would like it to work in Visual Studio as well.
> I have developed an Data Extension Provider to get data from a Business
> tier, instead of directly from a database. The Business tier calls a Data
> tier, which needs the connectionstring from appsettings. (I cannot change
> this behaviour.)
> Regards Maran|||A couple of thoughts:
1. Create your own App.config file, or any anyfile.anyfile - place your
config setting there.
Embed that file as a part of assembly.
next -
in your app:
Assembly asm....;
Stream stream = null;
string manifest = null;
foreach(string tmp in asm.GetManifestResourceNames())
{
if(tmp.IndexOf("App.config")>0)
{
manifest = tmp;
break;
}
}
....
stream = asm.GetManifestResourceStream(manifest);
XmlDocument configXml = new XmlDocument();
configXmlReader = new XmlTextReader(stream);
configXml.Load(configXmlReader);
XmlNodeList configNodes = configXml.GetElementsByTagName("appSettings");
....
and so on
2. machine.config is always available.
Oleg Yevteyev,
San Diego, CA
It is OK to contact me with a contracting opportunity.
"myfirstname"001atgmaildotcom.
Replace "myfirstname" with Oleg.
--
"Maran" <Maran@.discussions.microsoft.com> wrote in message
news:13D0CA98-7A7F-4023-B617-2917DC2B0AA3@.microsoft.com...
> Where do I put appsettings for Report Designer?
> It works fine on the Report Server (where I put them in web.config), but I
> would like it to work in Visual Studio as well.
> I have developed an Data Extension Provider to get data from a Business
> tier, instead of directly from a database. The Business tier calls a Data
> tier, which needs the connectionstring from appsettings. (I cannot change
> this behaviour.)
> Regards Maransql
Monday, February 13, 2012
app.config and connectionstrings with several databases
Hello all
I need to know the best way to work with databases (Sql Server) in my app.config.
I have an VB application that binds data from a SQL server (All Customers install these application and retrieve data via VPN). I use two databases for each customer. The first DB has some commun tables/data and the second one is its ID (Until now I setup manually the connections because we don't have more that 10 Customers but we need improve that for next year). I know that a connection string is created in the app.config file .
I don't know if it is possible from this way or if there is another way to do it... but the goal is:
1. Customer is logged in the application -User Name, ID, Password
2. Customer retrieve a database with commun data and his own database (that is his ID). (From the app.config?) How can I setup my app.config in order that every customer retrieve his database automatically when it is logged?
Thaks, I don't know if it's clear but I didn't find another way to explain my trouble
Hi
I hope I am following you.
If there are many customers I don't think it is a good way to store all there personal info(their ids) in app.config.
You can put all info into database and retrive them when the customer is logged in.
I don't what do you mean by saying own database , you might need to better design your database since it is not a good idea to add a new database(or even a new table) when you create a new customer.