Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP OLE DB - 'Provider cannot be found' 1

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,343
FR
I have an app which is currently using the (now pretty much unsupported) VFP ODBC driver and it works well enough.

I would like to try the OLE DB route instead - as this continues to be enhanced by MS.

I've downloaded the installation program and run it on my XP Pro machine which has the full MDAC installed on it, but despite trying various connection strings I keep getting an error.

Has anyone any experience of the OLE DB interface on XP? DO I need to have a full install of VFP 7/8 on that machine to get it to work? Can I get away with a 'client install' (runtime files only - no VFP7 development intended)?

The error message from the asp code is :
Code:
ADODB.Connection (0x800A0E7A)
Provider cannot be found. It may not be properly installed.

Regards

Griff
Keep [Smile]ing
 
Hi Rick,

I'm not sure.

I have tried registering it myself, and get no apparent difference...

Any ideas?

Regards

Griff
Keep [Smile]ing
 
Hi Rick,

The lines that are being rejected is as follows:
Code:
Session("ConnectionString")  = "Provider=VFPOLEDB.1;Exclusive=No;Data Source=WebData\DocELite.dbc;"
Set cnMyConn = Server.CreateObject("ADODB.Connection")
cnMyConn.Open Session("ConnectionString")

Once I installed the VFP 9 Beta (by way of testing) the lines work unmodified


Regards

Griff
Keep [Smile]ing
 
That's the funny(ish) bit, I'm not actually using the VFP 9 - I just installed it to get the VFPOLEDB from the MS download working, I'm certainly not using it to produce any finished works.

That said the beta was enough to convince me it was time to upgrade and buy the finished product! New projects will be in VFP9 as soon as it becomes available... Thus far, I'm still working in VFP5 and VFP6.




Regards

Griff
Keep [Smile]ing
 
Actually if you installed the VFP 9 beta you likely installed the VFP 9 OLE DB provider (unless you can deselect it via a custom install). They share the same name and location. Double check this by looking at the file properties and look at the version.

The same thing happened to those that upgrade from VFP 7 to 8. Microsoft's official position is the latest version is the best and there is no need for multiple versions installed.

_RAS
VFP MVP
 
You are quite right on that, so I am probably using the VFP 9 OLEDB file - for the time being!

I can PROBABLY back-peddle that by overwriting it with the VFP 8 one I downloaded from MS - so that will take the production worry out.

How do I install just the VFPOLEDB.DLL on a target machine though, seeing as the download on it's own from MS doesn't work unless VFP is already installed.

Is it possible to make a small 'hello world' style appication that would install the driver?

Any clues?

Regards

Griff
Keep [Smile]ing
 
Just tested, and by renaming the vfp 9 version and copying a VFP 8 one into it's place the VFPOLEDB.DLL does continue to function (after a reboot to make sure it wasn't in cache).

So, all I need to know is how to get that version to work without installing the whole of VFP 8 (or 9!).

Many thanks for your help Rick

Regards

Griff
Keep [Smile]ing
 
The easiest way to install it is to use the Merge Module installed with VFP using a product like InstallShield Express (full version or limited edition that ships with VFP).

Some developers do not like the Windows Installer technology, but you can still register the DLL using another tool like Inno Setup or the Tarma Installer.

_RAS
VFP MVP
 
Just an FYI. I currently have (2) two web applications. One is using VFP 3.0 as the database and ODBC for data access. The other is using VFP 7.0 as the database and the 7.0 OLEDB Provider which installed when VFP 7.0 was installed on the machine.

I've been running both fine for several months. Now, I wanted to upgrade to the VFP OLEDB Provider for 8.0 I retrieved the download from
Make sure you read the Read First document.

I did the upgrade first on the app using VFP 7.0. Renamed the v7 ole provider before installing v8, and I am able to switch back and forth by simply renaming the providers. Everything works wonderfully with a few exceptions.

v8 ole didn't like my v7 DELETE SQL commands. I had to make some modifications there.

v8 accepts the CommandType adCmdStoredProc, while v7 only likes the CommandType adCmdText.

Other than that, the backwards compatibility works just fine. Once I was satisfied with that installation, I repeated the identical process on the server running VFP 3.0 using ODBC. The SQL Statements, Connection Objects, Recordset Objects, etc.. on that application are identical to the ones written on the VFP 7 application that worked great with the VFP 8 provider. After installing the v8 provider on that server, I received the exact same error message that you are receiving.

So, there are two (2) questions that I never got around
to answering.

1.) Maybe there is a backwards compatibility issue using the v8 provider to update v3 database.

2.) There is a minimum requirement of MDAC 2.6 to properly install and register the v8 provider. The v8 provider installation does not come with this. Whether or not the v8 provider will continue to install if this requirement is not met is a subject of question for me.

I really don't intend to investigate this issue any longer because I am phasing out that 3.0 app. I just wanted to see if it was simple to install the v8 provider for that version of FP database.

Good Luck. I hope some of this helps.

ToddWW
 
Hi All,

Quick update, today I did an install of my web program on a Windows 2003 server.

I installed the VFPOLEDB (VFP 9 version) straight from the MS website and it worked straightaway!

(I tested it before install and it came up with the 'Provider could not be found' error).

I'm guessing that either MS has fixed the problem, or the Windows Server had something already on it (MDAC or something?).


Regards

Griff
Keep [Smile]ing
 
FYI - we just ran into this issue moving an app from a Win2k server to Win 2003 with the old vfpoledb - same everything as far as we could tell on both servers - worked fine on Win2K, same "Provider not found" error on the new server - I followed your advice above and downloaded VFPOLEDB (VFP 9 version) - now it all works on the Win2003 server. So thanks...

Joe Halloran
 
Glad to be of some small help!

(I suppose that's the whole point of Tek-Tips)

Regards

Griff
Keep [Smile]ing
 
Yes I agree - in this case you followed up months later with a piece of additonal info - and it saved us a good bit of time and trouble!

Cheers...

Joe Halloran
 
Good point!

Regards

Griff
Keep [Smile]ing
 
Once it's installed on a server (web server typically) you can use the vfpoledb to access VFP tables much as you would using the ODBC driver.

The open call looks like this:
Code:
Set cnMyConnection = Server.CreateObject("ADODB.Connection")

cnMyConnection.open "Driver={Microsoft Visual Foxpro Driver};SourceType=DBC;SourceDB=c:\myDatafolder\myDatabase.dbc;Exclusive=No;BACKGROUNDFETCH=NO;"

Regards

Griff
Keep [Smile]ing
 
gattabria,

You can also install the OLE DB driver on a client workstation and they can use it with tools like MS Office, or other third-party reporting tools to access data maintained by a VFP application (custom or vertical market app).


_RAS
VFP MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top