Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Steve Bloodsworth
  Where is Steve Bloodsworth?
 Sarasota
 Florida - United States
 Steve Bloodsworth
 Tags
Subject: Access Denied
Thread ID: 78578 Message ID: 78578 # Views: 9 # Ratings: 0
Version: Visual FoxPro 8 Category: Active X Controls & OLE Automation
Date: Wednesday, October 05, 2005 6:11:57 PM         
   


I have a dilemma.

I made a Multi-threaded DLL, (FPaccess.dll) that I placed on my file server as:

DEFINE CLASS FPExecutor AS Session OLEPUBLIC

PROCEDURE SqlCommand( tcCommand as String ) as String
   
   local lcReturn
   lcReturn = ""
   
   Close Databases all

   Set Path To 'D:\Order System\Ord95\'
   
   &tcCommand.
   
   If Empty( Alias() ) or Reccount() = 0
      * Nothing to do
   Else
      CursorToXML( Alias(), "lcReturn", 1, 1 + 8, 0, "1" )
   endif
      
   Return lcReturn
ENDPROC

ENDDEFINE



I went on the server and went into Component Services and added the Application, and the component. Set the access permission, and exported to create a setup file.

I went on my machine and ran the setup file, then defined the object as:

loServer = CreateObject( "FPaccess.FPExecutor" )


Worked fine, no errors.

Ran a test as:

lcXML=loserver.SqlCommand('SELECT psinve.* FROM I:\ord95\psinVE WHERE Stockno="225-001"')
XMLToCursor( lcXml, "Results" )



And I got an error. It seemed that I had put the wrong directory in my DLL as the directory where the data files were.

So I fixed it. And Updated the DLL.


Now every time I run:
loServer = CreateObject( "FPaccess.FPExecutor" )


I get "OLE Error Code 0x80070005 Access is Denied".

I've tried uninstalling it locally, recreating it on the server, renaming it, restarting, everything I know, but now get this error every time.


Any insight as to why it would work once, then when I changed a bit of code in it, it now doesn't?

Thanks,

~Steve

ENTIRE THREAD

Access Denied Posted by Steve Bloodsworth @ 10/5/2005 6:11:57 PM
RE: Access Denied Posted by Barbara Peisch @ 10/5/2005 10:13:29 PM