Using ADO (Was: RE: [Mono-devel-list] Stupid novice question)

Aleksey Sudakov zander at objectstorm.net
Fri Mar 7 10:04:41 EST 2003


> What database provider are you trying to use?   Most of the generic
> ADO.Net interfaces and base classes come from System.Data and
> System.Data.Common.

Well, I load (or at least try) providers dynamicly based on configuration
file. The code looks like this:

Assembly assembly = Assembly.Load("System.Data");
result = (IDbConnection)assembly.CreateInstance(model.ConnectionType);

And it fails to compile with "Cannot find type IDbConnection" error. All I
did though is 'mcs Adaptor.cs'. Is there some special steps that need to be
taken to compile code that uses ADO or should it comiple out of the box?

Thanks,
Aleksey




More information about the Mono-devel-list mailing list