473,385 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem using FoxPro OLE DB Connection


Greetings,

I am running IIS on W2kServer and am trying to use ASP with some
legacy X-Base tables. I cannot get the provider to connect.

Relevant code is:

strProvider = "Provider=vfpoledb;Data Source=C:\DB2\DDMS\"

set objConn = server.createobject("ADODB.Connection")

objConn.Open strProvider
This style works fine with Access tables, but I get the following
error with the vfpeledb connection attempt:

An exception of type "ADODB.Connection: Provider cannot be found. It
may not be properly installed" was not handled.

I have installed the Visual FoxPro v8 drivers, and have set the
metadata in the global.asa file as follows: (watch the word wrap)

<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.7
Library" UUID="{EF53050B-882E-4776-B643-EDA472E8E3F2}"
VERSION="2.7"-->

<!--METADATA TYPE="TypeLib" NAME="Microsoft OLE DB Provider for Visual
FoxPro 7.0 Type Library" UUID="{50BAEECA-ED25-11D2-B97B-000000000000}"
VERSION="1.0"-->

Then ASP complains that it cannot find the metadata:

Active Server Pages, ASP 0223 (0x80004005)
METADATA tag contains a Type Library specification that does not match
any Registry entry.

Registry entries ARE present for the v7 library, but not the v8 - I
assume this is normal. Reinstallation changed nothing. The dll is
present in the proper directory, and all registry entries point to it.

References in InterDev v6 show up and I can open the tables fines
within the IDE, but ASP refuses to acknowledge their existance.

Any ideas?
Dr. Know
Jul 22 '05 #1
9 7758
Dr. Know wrote:
I am running IIS on W2kServer and am trying to use ASP with some
legacy X-Base tables. I cannot get the provider to connect.
...
strProvider = "Provider=vfpoledb;Data Source=C:\DB2\DDMS\"
...
I have installed the Visual FoxPro v8 drivers, and have set the
metadata in the global.asa file as follows: (watch the word wrap)


Have you tried using a .udl file to generate a connection string?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #2
Dave Anderson said:
Dr. Know wrote:
I am running IIS on W2kServer and am trying to use ASP with some
legacy X-Base tables. I cannot get the provider to connect.
...
strProvider = "Provider=vfpoledb;Data Source=C:\DB2\DDMS\"
...
I have installed the Visual FoxPro v8 drivers, and have set the
metadata in the global.asa file as follows: (watch the word wrap)


Have you tried using a .udl file to generate a connection string?


No, we are trying to use the OLE DB provider, not the old ODBC
connection method. Something about obsolete, dysfunctional drivers,
improper handling of non-string fields, and multiple thread contention
issues...

Of course, this is all new to me, and I could be wrong...
Dr. Know
Jul 22 '05 #3
Dr. Know wrote:
Dave Anderson said:
Dr. Know wrote:
I am running IIS on W2kServer and am trying to use ASP with some
legacy X-Base tables. I cannot get the provider to connect.
...
strProvider = "Provider=vfpoledb;Data Source=C:\DB2\DDMS\"
...
I have installed the Visual FoxPro v8 drivers, and have set the
metadata in the global.asa file as follows: (watch the word wrap)


Have you tried using a .udl file to generate a connection string?


No, we are trying to use the OLE DB provider, not the old ODBC
connection method. Something about obsolete, dysfunctional drivers,
improper handling of non-string fields, and multiple thread contention
issues...

Of course, this is all new to me, and I could be wrong...

You are. A UDL file can use either ODBC or OLE DB. You have two options:
A. Go to www.able-consulting.com/ado_conn.htm and look up the correct
connection string for foxpro (which I've never used so I can't advise you)
B. Try using a UDL file to generate a connection string:
1. Right-click your desktop and choose New| Text File
2. rename the file test.udl
3. double-click it to start the wizard
4. On the first tab, choose the foxpro provider if it's there
5. go through the remaining steps to point it at your database file
6. test the connection
7. if the test is successful, close the wizard and open the file in
Notepad. You will see the connection string in plain text

HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #4
Bob Barrows [MVP] said:
Dr. Know wrote:

No, we are trying to use the OLE DB provider, not the old ODBC
connection method. Something about obsolete, dysfunctional drivers,
improper handling of non-string fields, and multiple thread contention
issues...

Of course, this is all new to me, and I could be wrong...

You are. A UDL file can use either ODBC or OLE DB. You have two options:
A. Go to www.able-consulting.com/ado_conn.htm and look up the correct
connection string for foxpro (which I've never used so I can't advise you)
B. Try using a UDL file to generate a connection string:


OK - I read the previous answer incorrectly. I thought he meant to
use a dsn file to open the DB through ODBC...

But nevertheless - it still doesn't work.

The wizard creates this connection string:
(which differs little from my original string)

Provider=VFPOLEDB.1;Data Source=C:\DB2\DDMS;Password="";Collating
Sequence=MACHINE

It tests OK in the wizard, but refuses to work in ASP - although it
and my original string work in VBA. Alternate DB formats, such as
MDB, also work fine...

I am beginning to think it's a bug... uhh... feature... :-|

And I'm not kidding about the dysfunctional VFP drivers & improper
handling of non-string fields, read this for a taste of the bizarre:

http://support.microsoft.com/default...b;en-us;321631

This is why we went to the new v8.0c drivers...

Thanks,

Greg
Dr. Know
Jul 22 '05 #5
Dr. Know wrote:
The wizard creates this connection string:
(which differs little from my original string)

Provider=VFPOLEDB.1;Data Source=C:\DB2\DDMS;Password="";Collating
Sequence=MACHINE

It tests OK in the wizard, but refuses to work in ASP - although it
and my original string work in VBA. Alternate DB formats, such as
MDB, also work fine...


We had a similar problem with Oracle drivers above 9i, and the solution
involved propagating permissions in the Oracle directory structure. The
problem in that case was that IIS runs under a system account whose
permissions are either not set up correctly by the Oracle installation, or
were altogether nonexistent.

If I had to guess at this point, I'd say you have a file permission problem.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #6
Dr. Know wrote:

But nevertheless - it still doesn't work.

Please try to describe your symptoms without using the words "doesn't
work".

Is it the same error? An exception of type "ADODB.Connection: Provider cannot be found. It
may not be properly installed" was not handled.


If so, you need to realize that the ASP application is running under a
different user account than the one being used when you tested your UDL
file. The IUSE_machinename account needs to be granted sufficient
permissions to allow you to use this provider. Unfortunately, never having
used foxpro, I'm not really sure what those permissions have to be (I
suspect Registry keys are involved). Please try a foxpro group for help.

Here are some search results for you to investigate:
http://support.microsoft.com/default...b;en-us;278604
http://support.microsoft.com/default...b;en-us;883842 - similar
error for different database, which does talk about permissions

http://groups-beta.google.com/group/...c2fb9bf13d4f61

http://vfpdev.narod.ru/docs/spcall_e.html#oledbsolve - scroll down to the
bottom

http://www.google.com/search?sourcei...e+found%22+ASP

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #7
Bob Barrows [MVP] said:
Dr. Know wrote:

But nevertheless - it still doesn't work.
Please try to describe your symptoms without using the words "doesn't
work".
Is it the same error?
An exception of type "ADODB.Connection: Provider cannot be found. It
may not be properly installed" was not handled.


Yes, Same symptom, Same error - I suppose my frustration is showing...
If so, you need to realize that the ASP application is running under a
different user account than the one being used when you tested your UDL
file. The IUSE_machinename account needs to be granted sufficient
permissions to allow you to use this provider. Unfortunately, never having
used foxpro, I'm not really sure what those permissions have to be (I
suspect Registry keys are involved). Please try a foxpro group for help.
I did not take that into account - and (improperly?) assumed that all
OLE DB providers were allowed the same security through MSDAC.

I actually did do a search at MS for the error string, but didn't come
up with these particular matches.
Here are some search results for you to investigate:
http://support.microsoft.com/default...b;en-us;278604
http://support.microsoft.com/default...b;en-us;883842 - similar
error for different database, which does talk about permissions

http://groups-beta.google.com/group/...c2fb9bf13d4f61

http://vfpdev.narod.ru/docs/spcall_e.html#oledbsolve - scroll down to the
bottom

http://www.google.com/search?sourcei...e+found%22+ASP

Bob Barrows


Thanks, Bob, for the research and info - you have gone out of your way
to help with this.

I'm not certain we'll EVER resolve this behaviour - seeing that it
works properly under VBA and VB, but not VBScript. We don't actually
USE FoxPro - we just have to deal with it's legacy remains. I'm of a
mind at this point to just rely on a service written in C++ or a COM
object to handle the postings to the X-base DBF. The ASP page
actually writes the user info into an MDB or SQL Server DB at first,
but after some processing, it is then posted into a legacy DB system.
I suppose this could be (better) handled with a daemon.

I'll look into the permissions aspect, but I don't know how I would
change the behaviours for different DLL's individually. I HAVE
re-registered the DLL and checked the registry entries manually - that
was my first response to the error.

Thanks again,

Greg
Dr. Know
Jul 22 '05 #8

SOLUTION BELOW

Dr. Know said:
... but I get the following
error with the vfpeledb connection attempt:

An exception of type "ADODB.Connection: Provider cannot be found. It
may not be properly installed" was not handled.

I have installed the Visual FoxPro v8 drivers, and have set the
metadata in the global.asa file as follows: (watch the word wrap) ...... Registry entries ARE present for the v7 library, but not the v8 - I
assume this is normal. Reinstallation changed nothing. The dll is
present in the proper directory, and all registry entries point to it.

References in InterDev v6 show up and I can open the tables fines
within the IDE, but ASP refuses to acknowledge their existance.


The solution to this problem has been de-mystified!
Thanks to all who helped out with this aggrevating problem.

It seems that MS is adding some improper registry entries with the new
VFPOLEDB.DLL installation - otherwise known as Visual FoxPro v8
Service Pack 1.

I uninstalled the original install with the MS installer - after
having saved copies of the VFPOLEDB.DLL file and the help.chm files
that were installed.

After removal, I replaced the copied DLL into it's original location
and registered it manually. Viola! It works fine...
Manually re-registering the DLL does not work - you have to uninstall
it with the "remove programs" installer first!

Thanks, Bill! Another day shot to @#$.

And Thanks to MVP Bob who pointed me to the Russian web site that
oriented me towards this solution.

Greg


Dr. Know
Jul 22 '05 #9

Hi Dave Anderson,

I happened to see your post re an OLEDB-Oracle error that you mentioned in
one of your posts.

I summarise the issue that I have as follows

1) I wrote a VB component, which connects to an Oracle DB and does some data
retrieval and updates
2) This component is instantiated in ASP page and when the ASP page runs it
gives the following error, "Error 3706: Provider cannot be found. It may not
be properly installed."
3) I am using cnDB.Open "Provider=OraOLEDB.Oracle;Data Source=111;User
Id=111;Password=111;" and i have checked that the VB COM works when called
within a VB program
4) considering that VB COM connects to the Oracle DB successfully when
instantiated from VB, I am not sure why it does not work from ASP.
FYI, I'm running Oracle 9.2, MDAC 2.8, WInXP service pack 1.; uisng local
IIS (developer workstation)
Would really appreciate any help.
Thanks
Rajy
"Dave Anderson" wrote:
Dr. Know wrote:
The wizard creates this connection string:
(which differs little from my original string)

Provider=VFPOLEDB.1;Data Source=C:\DB2\DDMS;Password="";Collating
Sequence=MACHINE

It tests OK in the wizard, but refuses to work in ASP - although it
and my original string work in VBA. Alternate DB formats, such as
MDB, also work fine...


We had a similar problem with Oracle drivers above 9i, and the solution
involved propagating permissions in the Oracle directory structure. The
problem in that case was that IIS runs under a system account whose
permissions are either not set up correctly by the Oracle installation, or
were altogether nonexistent.

If I had to guess at this point, I'd say you have a file permission problem.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Matt Young | last post by:
I've been tasked with integrating an older management system based on DBF files with my snappy new ASP application to provide users of the ASP application with real-time data from the management...
12
by: Riley DeWiley | last post by:
I have a project that is using a Jet backend and having trouble with Jet's tendency to bloat it's MDB file. I can compact it but it is a hassle. I am considering switching to a Fox backend but have...
0
by: Yama | last post by:
Hi All I am trying to access a Fox Pro Free Table on the network as follow Dim cmd As New OdbcCommand Dim conn As OdbcConnection = New OdbcConnection("Driver={Microsoft Visual FoxPro Driver};"...
1
by: Martin | last post by:
Hi, I've got a scenario where I have two different data sources, one is an SQL server and the other is a Foxpro DBF table. What I'm trying to do is take data from the SQL server and place it into...
2
by: Toco | last post by:
Hello. I have app written in C# that we are testing. The executable is shared on our network. The method we are testing is a call to a foxpro table. The call is made to query the table, then...
4
by: Robert Hooker | last post by:
I have installed our .NET application on a system running Microsoft Windows Vista operating system. When I run our application, I receive the following error message whenever it tries to create...
12
by: Alex S | last post by:
Hello everyone, My company uses a FoxPro database right now as an interface and a database. For our situation, I have come to the conclusion that it would be a better choice for us to move to an...
0
by: MIHAB | last post by:
Hi everyone. I have experienced a weird type of error – something obvious but I can’t get it. I am working with the ASP (VBSCRIPT) and FoxPro tables via ODBC. The goal is to update one table...
2
by: cj | last post by:
We have a legacy accounting system (not developed in house) here that happens to be written in Visual FoxPro. One of the tables has an index that is actually a coded function COMPANY1 ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.