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!

OLE DB Connection String

Status
Not open for further replies.

ToddWW

Programmer
Mar 25, 2001
1,073
US
I am using VFP 7.0 database container with CDX. I am accessing the data from about 6 client machines running VFP clients and 1 web server running IIS. I am using Active X Data Objects (ADO) to access the VFP data via Active Server Pages.

I am currently converting over from an old VFP 3.0 database where I used an ODBC driver for access. That was not very reliable under load and / or for heavy queries because the ODBC driver was not thread safe. Before converting over to VFP 7.0, I read from MSDN that using the OLE DB provider resolves this problem because it is thread safe.

I've been running the application under fairly light loads for about 4 months now without a single problem. Then, this morning, IIS locked up just like it did when I was using the ODBC with VFP 3.0. So I've been spending the entire day looking for any reported bugs with VFP and ASP. I can't find any.

There are two (2) possibilities here. The first is that IIS just simply crashed. The web server's been running for months without even restarting web services. But then again, my old app using ODBC ran great for months until I put it under heavy load. (Yes, I have already toggled the FETCH DATA IN BACKGROUND property in the vfp ODBC driver properties and the old app still has problems under heavy loads.) The second possibility is that I am not setup correctly or need to update the OLE DB provider.

By the way, the symptoms when IIS crashed this morning are as follows:

1) Web pages could still be served by IIS. Only web pages calling the ADO connection to foxpro would not serve.
2) All clients running VFP continued to work fine while IIS and ASP were having problems.
3) Restarting IIS (not the entire web server) solved the problem and the web site worked fine after that.
4) Basically the exact same problem and symptoms I was getting using the ODBC driver with VFP 3.0

As far as setup goes, this is the connection string I am using with Active Server Pages / ADO.
Code:
Session("strProvider") = "Provider=vfpoledb.1; Data Source=d:\data\fbdata1.dbc"

I was searching for alternative connection strings and found the following:
Code:
' Session("strProvider") = "Provider=vfpoledb.1; Data Source=d:\data\fbdata1.dbc; Mode=ReadWrite|Share Deny None; Collating Sequence=MACHINE"

I tested that and it worked fine. I'm wondering if it really makes a difference. In the connection string that I have been using it is calling vfpoledb.1 and the new connection string calls simply vfpoledb. What is the difference ?

I also found out that there is an update for the VFP OLE DB provider for 8.0.


Should I install this for 7.0 ?

Any suggestions would be greatly appreciated.

ToddWW
 
Todd,
I can answer the final question - yes you can use the most recent VFP OLE DB Provider (8.0) for a 7.0 datasource. In fact you can even use it for a really old FoxBase free table (.DBF) - it is fully backward compatible.

You can also use the 9.0 provider which will be out later this year - it will have even more capabilities. Note: While you can test with the one included with the VFP 9.0 beta, it is a beta product and should be replace with the "real" one later.

Also, vfpoledb always points to the current provider and it may be vfpoledb.1 or vfpoledb.2, etc. These are just pointers to alternate installed files. If you check your registry at HKEY_CLASSES_ROOT\VFPOLEDB\ you'll see that the CurVer entry is probably vfpoledb.1 which is just below it. In other words, vfpoledb is the generic way to reference whatever is current, where vfpoledb.1 picks a specific Provider.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top