Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DIRECTORY() returns .f. in Interop VFPDLL
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
DIRECTORY() returns .f. in Interop VFPDLL
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015129
Message ID:
01015129
Views:
51
Hi, all,

I have a VFP MTDLL which is referenced by an ASP.NET app.
The DLL is configured to open a database located on a different W2K Serever machine.
It is coded like this:
FUNCITON LoadData as Integer ;
  HelpString [Loads the VFP Database]
  lcDatabase = "\\W2KDOMAIN\DONW2K\DATA\"
  IF DIRECTORY(m.lcDatabase) ;
  THEN 
    OPEN DATABASE (m.lcDatabase+"mydb.dbc")
  ENDIF
  &&code omitted...
ENDFUNC && LoadData
This works perfectly fine the DLL is called from VFP command line and doesn't matter where the data is located (local or the server):
loObj = CreateObject("ClientAccess.CClientAccess")
loObj.LoadData() && Works 
The DLL is added as a COM reference to my ASP.NET project. I've created a wrapper class which helps other classes the web app to communicate with the VFP MTDLL object.
//Code omitted
public class CClientAccessWrapper
{
   private m_oVFPDB CClientAccess;
   public virtual void InitializeComponents()
   {
     this.m_oVFPDB = new CClientAccess();
     this.m_oVFPDB.LoadData();
   }//InitializeComponents
}//CClientAccessWrapper
An unhandled exception occurs when LoadData method is called, I found out that the DIRECTORY is returning .f. in the LoadData if and only if the path is pointed to the W2K Server. In other words, if the database is located on the local machine it works. It seems to be some sort of Security Policy/User Rights issue.

Can anybody point me into the right direction? I would greatly appreciate it.
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Reply
Map
View

Click here to load this message in the networking platform