#145234 - 2005-08-10 07:53 PM
Re: General ODBC Question
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
ODBC is more of a standard. You will need specific ODBC drivers for each database. I suggest you visit the Microsoft web site and search for ODBC and MDAC for more information.
|
|
Top
|
|
|
|
#145236 - 2005-08-11 07:35 AM
Re: General ODBC Question
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Quote:
Can you use ODBC to connect to any database? --Like can I use ODBC to connect to and write to MySQL, SQL, Oracle databases without using a specific driver??
There are a number of articles on DSN-Less Connections, if you do a Google Search. However, they still use a driver (DLL File) to make the connection. Think of it this way, when you go up to meet someone for the first time.. What do you do? You give them a handshake. Think of an ODBC driver/connection as the handshake. If there is no handshake, there is no connection. Like Howard and Jens said, you will need to connect in. There are drivers can come from Microsoft for Oracle, but generally are better from Oracle themself. MySQL had their own driver and Microsoft does not have a MySQL Drivere.
HTH,
Kent
|
|
Top
|
|
|
|
#145237 - 2005-08-11 10:16 AM
Re: General ODBC Question
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
The answers are all in the above posts, but I'll take your questions one at a time to clarify a bit.
Quote:
Can you use ODBC to connect to any database? --Like can I use ODBC to connect to and write to MySQL, SQL, Oracle databases without using a specific driver??
No.
For each database that you connect to you will need to install a specific driver that knows how to tak to the database.
A database service does not "talk" ODBC, it will only talk it's own (often proprietary) language.
Quote:
Is that the purpose of ODBC?
No.
ODBC is an abstraction. It allows you to write code that uses ODBC SQL. This SQL is independant of the back-end database that you are using. It means that in most cases you can take the same code and use it with any back-end database without changing it. All you need to do is change the DSN or the connection string.
Each ODBC database driver will convert the ODBC commands into something that the back-end database understands, but this happens behind the scene, you don't ever need to worry about it.
So, if you connect to an Oracle database your Oracle driver will convert the ODBC commands into Oracle SQL or SQL*Net or PLSQL whatever it is nowdays.
The drivers will also emulate some things that are not supported in the back end but are part of the ODBC standards.
The only tricky bit is that there are different versions of ODBC which support different features, so don't always expect to be able to use advanced techniques such as cursors - you need to code to the lowest featured ODBC driver that you reasonably expect to encounter.
Quote:
I just don't totally understand ODBC and was wondering if anyone had any good links to read up on for the subject
With any term like this a good place to start is Webopedia http://www.webopedia.com/TERM/O/ODBC.html
You could also google for "ODBC FAQ" and see what turns up.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 363 anonymous users online.
|
|
|