Topics: General Discussion Forum, July and December Releases Forum
Feb 7, 2007 at 5:56 PM
Edited Feb 7, 2007 at 5:56 PM
Working on a project where we are using SQL for development, but the database for production will be Oracle 10g. The database schema is designed in Visio and generated on both platforms.

The Business Entities, CRUD stored procedures and Respository are generated by the Data Access factory using the SQL connection.

We are planning to migrate the SQL stored procedures generaed by Data Access Guidance Package to PL/Sql, and to retain the sp name, parameters and datatypes.

But the problem for the moment is how to implement the connection to the Oracle Database.

We have tried to subclass GenericDatabase to create a Db that is compatible with Data Access Guidance Package. But that is not without hickups.

The issue is that OracleCommand in Oracle.DataAccess.Client is implementing IDbCommand but is not derived from DbCommand.

This typecasting is not allowed:

protected override void DeriveParameters(DbCommand discoveryCommand)
OracleCommandBuilder.DeriveParameters(discoveryCommand as DbCommand);


And we have to create something like this:

protected override void DeriveParameters(DbCommand discoveryCommand)

This solution (not tested) will only implement the most basic operations, and a lot of Oracle methods that might improve performance is unavailable.

We could also wait for the comunity Oracle implementation (the current download doesn't work with Software Factory December 06), or we could create Business Logic that instansiate ODT classes and totally ignore the Repository.

Any suggestions?
Feb 8, 2007 at 6:31 PM
I'm not sure if this may be of some help but did you try the OracleSchemaDiscovery (
In case you already did, what about giving a try to the DAAB in EntLib 2.0? See ( and (

Feb 12, 2007 at 2:02 PM
I'll look into that.

The issue for the momemnt is that Oracle doesn't return a result set the same way as MS Sql. Unless anyone can prove me wrong, I'll have to use cursors to iterate over OracleDataReader from ODT.

Therefore, I cannot create common code for SQL and Oracle - the Repository is different, and I cannot replace the two databases by just changing the connection string.


Jun 12, 2008 at 7:19 AM
Edited Jun 12, 2008 at 7:20 AM

I will also planning to do a WCF application and I would like to use the software factory and guidance automation. But I have no idea it well goes with multiple databases. I have few questions on this.

1. If I have created the application with SQL Sever as back end. Can I easily prot to oracle or some other databases?
2.What are the steps to port to other databases?