I agree that would be very helpful. _____
From: Potter, Christopher [mailto:[EMAIL PROTECTED] Sent: Monday, January 29, 2007 3:25 PM To: [email protected] Subject: RE: Storing Connection Strings in the <connectionStrings> in .config files Hi All: I would love to see this in the code base. Thanks, Chris Potter Confidentiality Notice: This E-mail message, including any attachments, is for the sole use of intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. _____ From: Oddur Snær Magnússon [mailto:[EMAIL PROTECTED] Sent: Monday, January 29, 2007 9:11 AM To: '[email protected]' Subject: Storing Connection Strings in the <connectionStrings> in .config files Hi all, I was wondering about the Ibatis approach to storing connectionstrings. Ibatis now stores the connection strings in the sqlmap file, with optional property replacement like so: <database > <provider name="sqlServer20005" /> <dataSource name="TheDB" connectionString="data source=${datasource};database=${database};user id=${username};password=${password};NETWORK=dbmssocn"/> </database> Now since we sometimes have to share a connection string with other code which prefers storing the connectionstring in the <connectionStrings> section of the .config file, we have to maintain a copy of the connectionstring in both places. What would be ideal would be the option on saying something like: <database > <provider name="sqlServer20005" /> <dataSource name="TheDB" connectionStringName="TheDbConnectionString"/> </database> And then in our .config file say <connectionStrings> <add name=" TheDbConnectionString " connectionString="Database=TheDB;Server=TheDBServer;User Id=Spam;Pwd=Eggs;" providerName="System.Data.SqlClient"/> </connectionStrings> This would also allow us to use the configuration encryption features in the .net framework: http://msdn2.microsoft.com/en-us/library/ms998280.aspx Comments, improvments, ideas ? Implementing this seems like something that might be done really quickly. I'll implement it tonight and submit a patch if people would like to see it merged into the SVN release. - Oddur -------------------------------------------------------- Princeton Retirement Group, Inc - Important Terms This E-mail is not intended for distribution to, or use by, any person or entity in any location where such distribution or use would be contrary to law or regulation, or which would subject Princeton Retirement Group, Inc. or any affiliate to any registration requirement within such location. This E-mail may contain privileged or confidential information or may otherwise be protected by work product immunity or other legal rules. No confidentiality or privilege is waived or lost by any mistransmission. Access, copying or re-use of information by non-intended or non-authorized recipients is prohibited. If you are not an intended recipient of this E-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute any portion of this E-mail. The transmission and content of this E-mail cannot be guaranteed to be secure or error-free. Therefore, we cannot represent that the information in this E-mail is complete, accurate, uncorrupted, timely or free of viruses, and Princeton Retirement Group, Inc. cannot accept any liability for E-mails that have been altered in the course of delivery. Princeton Retirement Group, Inc. reserves the right to monitor, review and retain all electronic communications, including E-mail, traveling through its networks and systems (subject to and in accordance with local laws). If any of your details are incorrect or if you no longer wish to receive mailings such as this by E-mail please contact the sender by reply E-mail. --------------------------------------------------------

