Search code examples
c#devforce

Do I have to define the connection info in the Ibconfig file for Ideablade Devforce Classic 3.8.5?


We are using Ideablade Devforce Classic 3.8.5.

I would like to use a separate file (not ibconfig) to define all connection strings, and then read those strings and set Ideablade to use them when connecting to the DB.

The connection strings may be for Oracle/SQL Server/Access.

Can I dynamically build and use these separate connection strings on startup of my app? Or do I always need to have them defined in ibconfig? Thanks.


Solution

  • DevForce will look for connection strings (rdbKeys) in a config file - either a .ibconfig or app.config file - and via an implementation of the IDataSourceKeyResolver. The resolver allows you to resolve connection strings at runtime, so is probably what you're looking for. You can find more information on how to use it both in the Developers Guide, and in a Learning Unit called "Custom DataSourceKeyResolver" under the "300 Advanced" folder. Learning units are optionally installed with the product.