Solved

How to Connect to Database with ODBC and whats the diffrence

Posted on 2007-11-23
3
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

636 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