Multi-DataBase Application Support

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kat0

    #1

    Multi-DataBase Application Support

    Hi.
    I Have to do a muliple database application (think in a simple form
    that add, remove, and modify some table/s). But The problem is that
    the Database destination depends, can be per example SQL Server or
    MySQL, or Oracle or other.
    I Think to do a class that inherits from IDBConnection and one
    constructor whit one parameter that have TypeOfServer that give me
    MsSQL or MySQL per example like a String.
    If This paramater is "MsSQL" i return a connection of Type
    (System.Data.SQ LClient).
    Is that posible? i think this or a property of his class.

    How can i do it?
    Other problem is that i know that i can use SQLClient type for MsSQL
    but for MySQL what i use?

    And The Off-Toppic Question is.
    When you have an application, you use One conecction, and you open
    when application start and you close when application ends or you
    create an connect on every step you need?

    THANKS A LOT.
    kat0
  • Jaroslav Suchacek

    #2
    Re: Multi-DataBase Application Support

    Hi

    see http://www.codeproject.com/cs/database/dal.asp

    Jarek

    "kat0" <lnc_18@yahoo.c om.ar> wrote in message
    news:2e07f987.0 308040821.2a6e3 a63@posting.goo gle.com...[color=blue]
    > Hi.
    > I Have to do a muliple database application (think in a simple form
    > that add, remove, and modify some table/s). But The problem is that
    > the Database destination depends, can be per example SQL Server or
    > MySQL, or Oracle or other.
    > I Think to do a class that inherits from IDBConnection and one
    > constructor whit one parameter that have TypeOfServer that give me
    > MsSQL or MySQL per example like a String.
    > If This paramater is "MsSQL" i return a connection of Type
    > (System.Data.SQ LClient).
    > Is that posible? i think this or a property of his class.
    >
    > How can i do it?
    > Other problem is that i know that i can use SQLClient type for MsSQL
    > but for MySQL what i use?
    >
    > And The Off-Toppic Question is.
    > When you have an application, you use One conecction, and you open
    > when application start and you close when application ends or you
    > create an connect on every step you need?
    >
    > THANKS A LOT.
    > kat0[/color]


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003


    Comment

    • MP

      #3
      Re: Multi-DataBase Application Support

      this is a very good example of what you need,

      The new .NET PetShop 3.0 implements a Data Access Layer against both SQL
      Server 2000 and Oracle 9i backend databases.

      and more...
      enterprise architecture
      used to compare to Sun Microsystem's J2EE Pet Store

      I hope this help...

      http://microsoft.com/downloads/detai...displaylang=en



      "kat0" <lnc_18@yahoo.c om.ar> wrote in message
      news:2e07f987.0 308040821.2a6e3 a63@posting.goo gle.com...[color=blue]
      > Hi.
      > I Have to do a muliple database application (think in a simple form
      > that add, remove, and modify some table/s). But The problem is that
      > the Database destination depends, can be per example SQL Server or
      > MySQL, or Oracle or other.
      > I Think to do a class that inherits from IDBConnection and one
      > constructor whit one parameter that have TypeOfServer that give me
      > MsSQL or MySQL per example like a String.
      > If This paramater is "MsSQL" i return a connection of Type
      > (System.Data.SQ LClient).
      > Is that posible? i think this or a property of his class.
      >
      > How can i do it?
      > Other problem is that i know that i can use SQLClient type for MsSQL
      > but for MySQL what i use?
      >
      > And The Off-Toppic Question is.
      > When you have an application, you use One conecction, and you open
      > when application start and you close when application ends or you
      > create an connect on every step you need?
      >
      > THANKS A LOT.
      > kat0[/color]


      Comment

      Working...