What are you passing to Configure?

If you can pass an XmlDocument object, instead of a file, you can just
replace the connection string in the dom before calling configure...
If you are currently passing the file path or file object, just read
the file into a XmlDocument first, change the connection string then
call configure.

Hope this helps.

Mike

On Mon, Aug 24, 2009 at 11:37 AM, Teddy78<teddy.fredaig...@sgcib.com> wrote:
>
> Hello all,
>
> I need to specify connectionString datasource in code, I cannot specify
> password in properties.config or in dao.config ( because I obtain the
> password by making a request to a service)
>
> How I can specify it?
>
> Here is my code :
> DomDaoManagerBuilder builder = new DomDaoManagerBuilder();
> //I would like to specify datasource before call the method Configure
> builder.Configure();  // This code use dao.config : I need to specify
> datasource in dao.config otherwise I get an error.
> IDaoManager daoManager = DaoManager.GetInstance("SqlMapDao");
> // now I can modify datasource of daoManager : but no interest for me :
> DataSource datasource = daoManager.LocalDataSource as DataSource;
> datasource.ConnectionString = "Server=Host\Server1;Database=db1;User
> ID=userId;Password=pwd";
>
> Thanks
> --
> View this message in context: 
> http://www.nabble.com/Dynamic-Datasource-with-DataAccess-tp25119303p25119303.html
> Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-cs-h...@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-cs-h...@ibatis.apache.org

Reply via email to