- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Database Connection string
Tue 31 Mar 2020 - 8:31
Is there a way to get the database connection string properties - e.g. database, server, etc?
- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Re: Database Connection string
Tue 31 Mar 2020 - 8:31
The connection string is not exposed because it could contain sensitive information.
- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Re: Database Connection string
Tue 31 Mar 2020 - 8:32
Richard did once tell me that you can use the in built Reporting sever DB Connection object - this is the same as your Matter Centre DB. Have a look at the following post to see if it helps...
http://support.fwbs.net/Support/Forum...
- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Re: Database Connection string
Tue 31 Mar 2020 - 8:32
Thanks for the replies. My situation is that I created some classes in VS which I then import the dll's to Matter Centre. I need the server name / db name to pass to the VS class to indicate which system (DEV / Test / PRD) it is. Any ideas how to do this
- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Re: Database Connection string
Tue 31 Mar 2020 - 8:32
you could add some DB Specific data (Admin Kit, System Config, Specific Data) to each environment, and then access it to find out what environment you're in. if(Convert.ToString(Session.CurrentSession.GetSpecificData(“ENVIRONMENT”)) == “DEV”)
{
...
}
{
...
}
- Lynne Harding
- Posts : 335
Join date : 2018-12-20
Re: Database Connection string
Tue 31 Mar 2020 - 8:32
Thanks @mvaughanThis is exactly what I have been looking for - basically the equivalent of a config file in c#.Works perfectly.
Permissions in this forum:
You cannot reply to topics in this forum