Results 1 to 3 of 3

Thread: Database independant components

  1. #1

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    Database independant components

    Hi all,

    I've created a way to use whatever database in your application. It's easy in use and provides implementations for as well as SQL Server and Access at the moment. Could easily be expanded to (f.e.) MySQL, SyBase etcetera.

    My question to you all is: is there something that could be made better? Or is there something I haven't thought of that is really important?

    Structure is as follows: IDBGeneric is the standard interface. DBGeneric is the class that should be instantiated from the client. Via this class, each call to the methods in IDBGeneric is forwarded to the classes with the implementations for each diffferent provider (currently DBGenericSQLServer and DBGenericAccess). All enumerations are provided into the 'Enumerations' module. The structures used are DBGenericInfo (which takes care of the properties needed to create a connection to the database) and DBGenericSelect (which holds values to create an SQL statement that could be executed via a command).

    What I like to know: do you like the idea I am providing here, or not, and why?

    Please let me know via this forum. Thanx for taking a look at the code anyway.

    Marco

    ps: mods: because it's fully working code, I've posted it here...

    ** EDITED **:
    forgot something: you have to create an access database and sql server database yourself...
    Attached Files Attached Files

  2. #2
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Database independant components

    Without even looking at your code, I'd suggest taking a look at DNN, these guys have done something like this. Also, I would suspect that there are other open-source applications or application blocks out there that provide database abstraction - you should probably research this topic quite a bit before formulating a working solution on your own.
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  3. #3

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    Re: Database independant components

    Quote Originally Posted by ntg
    Without even looking at your code, I'd suggest taking a look at DNN, these guys have done something like this. Also, I would suspect that there are other open-source applications or application blocks out there that provide database abstraction - you should probably research this topic quite a bit before formulating a working solution on your own.
    I know DotNetNuke, have worked with it. I don't want to use work from others because I fully want to understand what is going on. And hardcoding it yourself is the only way to figure things out. If people want to do it also themselves, I think the code will be a good starting point, especially for working with the common System.Data interfaces... That's the reason I posted the code here. It's not complete yet, but a starting point...

    Anyway, thanx for your suggestion...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width