Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Westminster Circle, Akron
 Ohio - United States
 Andy Kramek
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: Why ODBC and Not OLEDB?
Thread ID: 110533 Message ID: 111129 # Views: 106 # Ratings: 1
Version: Visual FoxPro 9 Category: ODBC, ADO and OLEDB
Date: Wednesday, October 25, 2006 3:04:41 PM         
   


Hi Pete

I have a couple of points to make in response to your 2-cents worth

> The two primary differences between the two are:

You omit to mention that OLEDB is COM based and is, therefore, only available on Microsoft Windows Platforms. As soon as you need to access a non-windows based platform you are back to ODBC (yes, I know there are OLEDB Providers for non-windows systems but they are just 'generic' providers - i.e. COM Wrappers around ODBC!)

> Now on top of the points above folks here we have a user that by his thread posted is
> using VFP 9.0. We all know that using the non-updated VFP ODBC driver many of the
> new field types that have been introduced are not supported using the VFP ODBC driver.
> This all comes to a head as we now want to start to take advantage of such field types
> as auto-incementing fields...etc... etc...


But this only applies to ACCESSING VFP Data using ODBC from other applications. In the context of using ODBC to access OTHER data stores this is totally irrelevant. Why would you use ODBC to access VFP data from VFP?

Since the advent of the "2000" model, other MS applications (e.g. Office and latterly .NET) have been designed around using OLEDB directly (as opposed to DDE which they used to to use) and that is the real reason why MS have not developed the VFP ODBC driver further, and are developing the OLEDB Provider instead.

>> Can I setup the DSN in VFP code, yes I can... do I need to added code, not me.

Come on, Pete, this is a red herring. As you know the easiest way to set up DSNs is to export the data from a REG file to a central location that is checked by the application at startup. When a new REG file is posted the App simply uses ShellExecute() to update the local user's DSN information. No additional code is involved!

This is especially important if you are running on a server 'farm' as opposed to a single machine. DBAs can, and do, move databases between servers (for patching, load balancing etc). The DBA can simply export an updated REG file and users, when they next log in, get the correct updated location information. This is MUCH harder to handle any other way!

> Do I want ODBC connections residing on 1000 workstations that any user with a bit of expereince can use.

First, this assumes that they are visible to the user. If you don't add the entry to the relevant key the connection is not visible and, since it does not include UID/Password anyway all it gives them is the name of the database, the server and the driver! Hardly a major issue surely?

I am not necessarily disagreeing with you, but, like me, your point of view is colored by your experience - and my experience is different.

I routinely integrate data from Windows and Non-Windows environments into Web Services created in VFP. In this environment OLEDB has proven slow and, in some cases, simply impossible. ODBC from VFP is fast and efficient and the fact that it is limited to SQL Relational Databases isn't an issue because that is all that I am interested in accessing this way.

I really don't need to talk to Excel Spreadsheets, or Word Documents or Outlook Folders. If I did,. I would use the appropriate tool - which might well be OLEDB. But as I see it, it is not "one or the other" or even "one size fits all"!

Of course, if I were building a .NET App to access SQL Server I would certainly NOT use ODBC, but I am not doing that either. I still think, and the evidence I have from my own daily work supports my view, that ODBC is still best way to access external RDBMS from within VFP.

Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA



COMPLETE THREAD
Why ODBC and Not OLEDB? Posted by Dexter Carlit @ 10/19/2006 10:00:17 PM
RE: Why ODBC and Not OLEDB? Posted by Pete Sass @ 10/20/2006 2:44:12 PM
RE: Why ODBC and Not OLEDB? Posted by Dexter Carlit @ 10/20/2006 5:22:23 PM
RE: Why ODBC and Not OLEDB? Posted by Pete Sass @ 10/20/2006 7:30:36 PM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 10/20/2006 7:37:19 PM
RE: Why ODBC and Not OLEDB? Posted by Bernard Bout @ 10/23/2006 10:38:51 AM
RE: Why ODBC and Not OLEDB? Posted by Ryan Lashway @ 12/4/2006 9:02:45 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 10/23/2006 1:57:47 PM
RE: Why ODBC and Not OLEDB? Posted by Eric den Doop @ 10/23/2006 2:43:15 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 10/24/2006 12:17:38 PM
RE: Why ODBC and Not OLEDB? Posted by Nilson Rishi @ 10/23/2006 3:32:12 PM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 10/23/2006 6:37:52 PM
RE: Why ODBC and Not OLEDB? Posted by Nilson Rishi @ 10/24/2006 5:17:33 AM
RE: Why ODBC and Not OLEDB? Posted by Bernard Bout @ 10/24/2006 6:18:13 AM
RE: Why ODBC and Not OLEDB? Posted by Nilson Rishi @ 10/24/2006 8:31:50 AM
RE: Why ODBC and Not OLEDB? Posted by tushar @ 10/24/2006 7:22:47 AM
RE: Why ODBC and Not OLEDB? Posted by Nilson Rishi @ 10/24/2006 10:00:29 AM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 10/24/2006 1:32:41 PM
RE: Why ODBC and Not OLEDB? Posted by tushar @ 10/25/2006 9:14:35 AM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 10/25/2006 1:10:22 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 10/24/2006 12:26:39 PM
RE: Why ODBC and Not OLEDB? Posted by Nilson Rishi @ 10/24/2006 1:03:04 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 10/24/2006 1:21:46 PM
RE: Why ODBC and Not OLEDB? Posted by Pete Sass @ 10/24/2006 10:23:04 PM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 10/25/2006 1:05:40 AM
RE: Why ODBC and Not OLEDB? Posted by Nilson Rishi @ 10/25/2006 4:31:57 AM
RE: Why ODBC and Not OLEDB? Posted by tushar @ 10/25/2006 9:28:28 AM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 10/25/2006 3:04:41 PM
RE: Why ODBC and Not OLEDB? Posted by Pete Sass @ 10/25/2006 4:10:42 PM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 10/25/2006 4:47:32 PM
RE: Why ODBC and Not OLEDB? Posted by Bernard Bout @ 10/25/2006 6:13:41 PM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 10/25/2006 6:40:19 PM
RE: Why ODBC and Not OLEDB? Posted by Bernard Bout @ 10/26/2006 5:55:08 AM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 10/26/2006 2:33:34 PM
RE: Why ODBC and Not OLEDB? Posted by Bernard Bout @ 10/26/2006 11:33:28 PM
RE: Why ODBC and Not OLEDB? Posted by Randy Smith @ 11/28/2006 8:59:48 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 11/29/2006 1:15:09 PM
RE: Why ODBC and Not OLEDB? Posted by Randy Smith @ 11/29/2006 2:58:16 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 11/29/2006 7:27:04 PM
RE: Why ODBC and Not OLEDB? Posted by Randy Smith @ 11/30/2006 11:14:13 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 12/1/2006 1:00:35 PM
RE: Why ODBC and Not OLEDB? Posted by Randy Smith @ 12/1/2006 4:03:51 PM
RE: Why ODBC and Not OLEDB? Posted by Andy Kramek @ 12/1/2006 5:21:24 PM
RE: Why ODBC and Not OLEDB? Posted by Randy Smith @ 12/5/2006 1:25:04 AM
RE: Why ODBC and Not OLEDB? Posted by Boudewijn Lutgerink @ 10/27/2006 11:33:27 AM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 10/27/2006 2:27:33 PM
RE: Why ODBC and Not OLEDB? Posted by Boudewijn Lutgerink @ 12/5/2006 12:55:03 PM
RE: Why ODBC and Not OLEDB? Posted by Ken Murphy @ 12/5/2006 3:12:45 PM