[thelist] [.NET] Multi-Database Programming
Marcus Andersson
marcus at bristav.se
Mon Nov 8 13:34:04 CST 2004
How about programming to interfaces and using reflection?
/Marcus
Joshua Olson wrote:
> Hi list,
>
> I'm developing a website that I expect to be used with SQL Server, MySQL,
> and Oracle. A software setting allows them to dictate which database to
> use. I've consolidated all the database utilities (ie, opening a connection
> object, command object, etc) into a few multi-purpose function. Ie,
> GetConnection will create a connection string and instantiate the correct
> connection object per the settings.
>
> Ok, so here's the problem..
>
> As soon as the function that references MySQL, even if the code-path doesn't
> allow for the code to be executed, the system tries to load up the assembly.
> If the assembly isn't installed on the client machine, then every blows up.
> The error being in this case:
>
> File or assembly name Oracle.DataAccess, or one of its dependencies, was not
> found.
>
> I've confirmed that the code that actually tries to create the OracleClient
> object is never invoked. And, I put some tracing at the top of the method
> and confirmed that the function doesn't execute even the first line.
>
> Any help would be appreciated.
>
> <><><><><><><><><><>
> Joshua Olson
> Web Application Engineer
> WAE Tech Inc.
> http://www.waetech.com/service_areas/
> 706.210.0168
>
>
More information about the thelist
mailing list