OD Db connection string

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

OD Db connection string

Post by wjstarck » Thu Dec 07, 2017 2:41 pm

I need to dynamically collect the OD Database connection string for use with a tableadapter.

Is that stored somewhere in the db (don't think so) or do I have to parse the XML in FreeDentalConfig.xml or is there a more straightforward way?
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: OD Db connection string

Post by jsalmon » Thu Dec 07, 2017 3:14 pm

You should parse the config file because users have the option to use middle tier and other such connections that might not set variables deep down in the connector as you would expect.

If you don't care about supporting any other way of connecting other than a direct database connections then you can get the connection string information straight from the variables / getter methods within DataConnection.cs
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: OD Db connection string

Post by wjstarck » Thu Dec 07, 2017 3:30 pm

Thanks
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply