Hi Bryan, Passing only a connection string means that we will create an IDbConnection implementation from this connection string. This means that something somewhere in DbLinq needs to reference the ADO.NET driver. ...And this is the first thing I removed when I entered the project, because we can not glue DbLinq to any version of any ADO driver. The best sample is for Oracle drivers, where you can use Microsof's driver or Oracle's ODP driver. Since also Oracle's ODP drivers still coexist in different versions, each being related to an Oracle database version, you can easily understand that sticking to a specific ADO.NET provider is bab.
I think we could find a trick, but I have no idea yet (maybe hardcore reflexion, like enumerating all loading IDbConnection implementations loaded in current AppDomain). Do you have a better idea? This would also help Mono to implement multi-database support. Pascal. On Sun, Oct 5, 2008 at 00:04, bryan costanich <[EMAIL PROTECTED]>wrote: > > Hi all, > > In working with the generated c# LINQ classes from DBMetal, i've > noticed that the two DataContext constructors both require an > IDbConnection, whereas the .net ones also allow you to pass among > other things, just a connection string. > > Looking into it, i see that the underlying DBLinq.DataContext class > actually has the constructors there, but they're unimplemented. they > are a little different though. they expect a > "fileOrServerOrConnection" string. but i'm not sure even what that > means. > > I think this should be added for a couple reasons. 1) to preserve > fidelity with the .net implementation, and 2) it's really damn useful. > > in thinking about maybe adding this, some questions popped up, namely: > -> what is the intent here, i believe the .net version supports only > valid db connection strings > -> if we get something in here, how do we determine the correct way to > initialize the connection, e.g. do we parse the 'provider'? what if > there is none? is there a standard here we should be looking at, e.g. > only valid .net connection strings? > > for now, personally, all i care about is mySQL, so i'm happy to throw > something in there that parses a valid .net connection string and if > the provider is DBLinq.MySql (or whatever it should be called), then > create a MySQL Connection, otherwise it would just throw an exception > - would that piss anyone off? > > perhaps i'm not the best person to be doing this, since i'm not > intimately familiar with the project, so if someone else wants to, > that would be even better, but i would like to use it soon. > > thoughts? > > -b > > > -- Pascal. jabber/gtalk: [EMAIL PROTECTED] msn: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
