Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003

    Unanswered: Different types of connection to database

    Dear Friends,

    Can any on in the help pool there tell me the difference in the connection types avialable for connecting to the database

    1. ADO
    2. OLE-DB Provider
    3. ODBC

    Thanks in advance.
    With Regards
    A friend in need is a friend in deed

  2. #2
    Join Date
    Sep 2003
    Newark, Vermont
    ADO – ActiveX Data Objects
    ADO itself is a COM (Microsoft Component Object Model) component. ADO is designed to give a single method for accessing data to everybody.
    There are three main objects on which the ADO object model is built:
    • Connection Object
    • Command Object
    • Recordset Object

    OLE-DB allows programs to access information in any type of data store(databases, spreadsheets, graphs, emails and so on), where ODBC allows only access to a database. It’s a collection of the COM interface encapsulating various database management system services. A service is a component that extends the functionality of data providers, by providing interfaces not natively supported by the data store.

    ODBC – Open Database Connectivity
    Where everybody can get the information they want without having to worry about the method of data storage. CGI(Common Gateway Interface) w/ ODBC was used before ADO. The web server itself would use ODBC to communicate with the database. CGI isn’t used as much anymore due to it being slower and having to use languages like Perl and C++.

    I got this right out of my programming book.
    Hope this help...

    Andrew Schools

  3. #3
    Join Date
    Feb 2002
    If you are using .net and sql server, you can use tds/sqlclient as well.

  4. #4
    Join Date
    Dec 2003
    Brasil, Goias, Goiania

    Thumbs up Almost there.

    Hi versoft!

    Well, in this case, we need to separate the object from the method of connection.

    The methods of connection are ODBC, OLE-DB, "native", ...
    The objects of connection are ADO, RDO, ADO.NET, ...

    You won't be able to connect in a DB just using ADO, for example. ADO is a set of objects to simplify the way of connecting to it, but you'll need a connection method like ODBC or OLE-DB.


    Your app -> ADO -> OLE-DB -> DB

    ADO is a "bridge" to the OLE-DB in this case. ADO is a simple way to connect and maintain your data in a DB, but it needs to use a method of connection.

    You may use ODBC-Direct or OLE-DB APIs but will be harder to support your code.

    Hope was helpfull.


Posting Permissions

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