Problem accessing FoxPro database across shared network

  • Thread starter Thread starter Glenn Wilson
  • Start date Start date
G

Glenn Wilson

Hi,

I am having problems connecting to a FoxPro database sitting on a shared
folder on a network from within my .NET application. I am using a the
following connection string to connect to the database:

'provider=VFPOLEDB.1;data
source='\\myServer\DataDirectory\FoxProDatabase.dbc'

When I try to connect to the database, I get an error thrown up by the
oledbprovider:

Microsoft OLE DB Provider for Visual FoxPro error '80040e21'

Invalid path or file name.

I have tried to resolve this by giving the IUSR account full admin rights
within IIS, but to no avail. The obvious task of checking the path location
to make sure it is correct has also been carried out. The server on which I
am running IIS can see the server on which the database is stored. I am
beginning to wonder whether I need to configure my .NET application in some
way.

I am using .NET Framework 1.1 on Windows 2000 Pro (and Server).

TIA

Glenn
 
1. Does it work when the file is local?
(I can do it locally and have never tried it with a UNC path.)

2. An old trick is to use DOS 8.3 file names and paths with Foxpro.
(Works for Access imports.)
No idea if it will work here though.
Try it and let us know!
 
Thanks for the reply Joe,

1) When the file is local, the connection works fine. It stops working as
soon as I use a network share.

2) I have tried using the 8.3 file naming convention to connect to the share
location, but I get the same problem.

My hunch is that there is a permissions problem somewhere. However, I have
tried different scenarios but none have worked. For example, I created a
new account in IIS with full admin rights setting the application to run
using this account. I have tried changing the configuration of my .NET
Framework using the .NET framework configuration tool to give my application
full trust.

I am getting quite desperate. A deadline is looming and I cannot work out
something as fundamental as allowing a .NET application to talk to a FoxPro
database on a shared network location.

Glenn
 
Try working around it then.
1. Copy the file locally

2. Use a mapped drive letter instead of UNC.

Good luck with the deadline!
 
Back
Top