Solved

How to Connect to Database with ODBC and whats the diffrence

Posted on 2007-11-23
3
296 Views
Last Modified: 2010-04-23
Hello guys,
                   whats the diffrence between ODBC and ADO.net, which are better, and is there any sample code of ODBC for vb.net 2005 (insert, delete,update, and select) .
Best regards
0
Comment
Question by:saudiprogrammer
  • 2
3 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20341853
ODBC is older and slower than ADO.net, but first allow you to connect to lots of database engines because it is independent of programming languages, database systems, and operating systems. ADO.net has ben specifically designed for the .net framework.

For an example of ODBC with vb.net, have a look to:
http://support.microsoft.com/kb/310985
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 20341854
0
 
LVL 14

Expert Comment

by:cuziyq
ID: 20341877
ODBC is an open set of standards that allow access to many different kinds of data sources (including databases like Oracle and MS SQL Server, file-based databases like Access or dBase, or even Excel and XML files).  Any data source that has an ODBC driver can be accessed using the same set of APIs with minimal rewriting of code.  Another advantage to ODBC is that it is available on all platforms (UNIX, Mac, and others), not just Windows.  A module written in C++ using the ODBC API can be ported very easily between platforms.

A major drawback to ODBC is that many custom features of database systems such as Oracle or MS SQL Server are not implemented in the ODBC API because they are specific to that company's product (although for a beginner, this will not be an issue).

ADO.NET is a Microsoft proprietary technology that is primarily used to interact with (obviously) other Microsoft products -- especially MS SQL Server.  ADO.NET's advantage is that modules written in .NET can be used in any of the .NET languages, and ADO.NET based database modules can be recompiled and implemented without having to register DLLs or reboot the web server.  .NET also makes heavy use of DCOM, which allows programs to communicate with each other.  Basically, that means that companies that make financial software, for example, can have their web site use the same database as their desktop product, or their inventory product.

The drawback to ADO is of course that it is proprietary M$ software.  It only works on Windows, and if Microsoft ever decides to deprecate it, you're out of luck.  This has happened before with their technologies such as OLE DB and MDAC (which were former database access technologies given up in favor of ADO).  The official M$ position is that new programs should not be written in OLE DB.  Microsoft will continue to support it (for a while, at least), but no new features will be added.  If you wrote your program with OLE DB tools, you're basically stuck rewriting your software if you want it to continue to be used in the future.

So basically your choices are an open standard but with a little more work to use some of the features, or a totally proprietary system, but with more flexibility and faster coding time.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question