Design unversal data connector

  • Thread starter Thread starter Mark Goldin
  • Start date Start date
M

Mark Goldin

I'd like to design using C# a universal data connector dll that I could use
to access SQL or Oracle databases
from my existing apllications. It should be really generic. Accepts
parameters for server name, database name, SQL command, login name, and so
forth.
Is there anything like this already exists?
If I need to develop it myself what would the best practice of doing this
be?

Thanks
 
Mark:

I know Michael Lang who used to post here fairly regularly had a sourceforge
project that did essentially what you describe, but I can't find any of his
old posts. My suggestion is to use a Factory Pattern to create these
objects..there are a few examples out there, this one should get you what
you need http://www.vbdotnetheaven.com/Code/Jun2003/2043.asp

HTH,

Bill
 
The link is broken.

William Ryan eMVP said:
Mark:

I know Michael Lang who used to post here fairly regularly had a sourceforge
project that did essentially what you describe, but I can't find any of his
old posts. My suggestion is to use a Factory Pattern to create these
objects..there are a few examples out there, this one should get you what
you need http://www.vbdotnetheaven.com/Code/Jun2003/2043.asp

HTH,

Bill
 
Mark

I've recently tidied up a project I did to acheive this - basically defines
it's own Connection, Command, DataAdapter and Transaction classes and then
uses a factory patten to decide which real provider to use.

Seems to work ok with SQL Server, OleDb and ODBC and I'm about to do the
testing on Oracle.

Only requirement is that you add another parameter to the connection string
to allow the factory to function - I found it too difficult to discriminate
within the connection strings otherwise.

I'm going to release this into the wild shortly under a BSD license, but let
me know if you want a copy in the meantime.

Paul Hatcher
 
Sure, I would love to test it.
Paul Hatcher said:
Mark

I've recently tidied up a project I did to acheive this - basically defines
it's own Connection, Command, DataAdapter and Transaction classes and then
uses a factory patten to decide which real provider to use.

Seems to work ok with SQL Server, OleDb and ODBC and I'm about to do the
testing on Oracle.

Only requirement is that you add another parameter to the connection string
to allow the factory to function - I found it too difficult to discriminate
within the connection strings otherwise.

I'm going to release this into the wild shortly under a BSD license, but let
me know if you want a copy in the meantime.

Paul Hatcher
 
Does it works on Compact FrameWork

----- Paul Hatcher wrote: ----

Mar

I've recently tidied up a project I did to acheive this - basically define
it's own Connection, Command, DataAdapter and Transaction classes and the
uses a factory patten to decide which real provider to use

Seems to work ok with SQL Server, OleDb and ODBC and I'm about to do th
testing on Oracle

Only requirement is that you add another parameter to the connection strin
to allow the factory to function - I found it too difficult to discriminat
within the connection strings otherwise

I'm going to release this into the wild shortly under a BSD license, but le
me know if you want a copy in the meantime

Paul Hatche
 
I haven't had to work with the Compact Framework, and the short answer is
not yet.

I'm having to do some re-work to support CF as it doesn't support
late-binding which I was relying on to access CommandBuilder objects. I've
refactored this and introduced an IDbCommandBuilder interface and writing
wrapper classes for each provider's CommandBuilder.

The other issue I have now is that the components fail to compile saying
that the resx is not a valid CF resx. I also want to explore a port of
NUnit that I found for CF so that I can use the same tests as far as
possible.

Regards

Paul
 
Back
Top