If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Different types of connection to database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-30-03, 01:51
versoft versoft is offline
Registered User
 
Join Date: Dec 2003
Location: USA
Posts: 33
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
Amit
__________________
A friend in need is a friend in deed
Reply With Quote
  #2 (permalink)  
Old 12-30-03, 16:53
jlot6 jlot6 is offline
Registered User
 
Join Date: Sep 2003
Location: Newark, Vermont
Posts: 20
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
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
http://www.codehungry.com
Reply With Quote
  #3 (permalink)  
Old 12-30-03, 22:03
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
If you are using .net and sql server, you can use tds/sqlclient as well.
Reply With Quote
  #4 (permalink)  
Old 01-02-04, 16:47
fabiano fabiano is offline
Registered User
 
Join Date: Dec 2003
Location: Brasil, Goias, Goiania
Posts: 14
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.

Example:

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.

Fabiano
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On