Hi Gilles:

 

Thanks for offering this option.  The compiler complains about
DomSqlMapBuilder.Properties not providing a getter.  I've confirmed
there is no getter in my 1.5.1 code base or the Subversion tip
(http://svn.apache.org/repos/asf/ibatis/trunk/cs/mapper/IBatisNet.DataMa
pper/Configuration/DomSqlMapBuilder.cs).  Is it in a newer source tip?
It seems like I can use the syntax below to accomplish the same thing.
I haven't tested this though.

 

NameValueCollection connectionStringProperty = new
NameValueCollection();

connectionStringProperty.Add("connectionString", "my connection
string");

builder.Properties = connectionStringProperties;

 

Thanks in advance for your help.

 

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: Gilles Bayon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 12:35 AM
To: user-cs@ibatis.apache.org
Subject: Re: Storing Connection Strings in the <connectionStrings> in
.config files

 

Today, you can used <connectionStrings> section in config file as 

<database > 

    < provider name= "sqlServer20005" />

    < dataSource name= "TheDB" connectionString ="${connectionString]"
/>

  </ database>

DomSqlMapBuilder builder = new DomSqlMapBuilder();

builder.Properties.Add("connectionString", my connection string retrieve
from the connectionString section app config); 

builder.Configure(...)



-- 
Cheers,
Gilles

<a href="http://www.amazon.com/gp/registry/6JCP7AORB0LE";>Wish List</a> 

Reply via email to