Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Database Connection string Empty 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?
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Database Connection string Empty Re: Database Connection string

Tue 31 Mar 2020 - 8:31
The connection string is not exposed because it could contain sensitive information.
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Database Connection string Empty 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...
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Database Connection string Empty 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
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Database Connection string Empty 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”)
{
...
}
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Database Connection string Empty 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.
Sponsored content

Database Connection string Empty Re: Database Connection string

Back to top
Permissions in this forum:
You cannot reply to topics in this forum