Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using COM Objects
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00260730
Message ID:
00260795
Views:
13
>Hello,
>I needed some guidence in designing some COM based objects that are going to be used in a Web site. The problem I need to solve is in locating the databases during the object's instantiation. When you create an EXE that runs, the Application object sets the path, class libraries, procedures, etc. However, when designing the COM object, the application object is not created and thus the above environment variables are not set. So, what is the best way to go about setting the environment? How do I set the path so that the object knows where to look for the database files? If you have any reading suggestions, they would also be greatly appreciated.


DEFINE CLASS MyClass AS Session OLEPUBLIC
cDataPath = "\\DataServer\WebData\VFP\"
ENDDEFINE

DEFINE CLASS AnotherClass AS MyClass

PROCEDURE MyProc
USE (This.cDataPath + "MyTable") IN 0
ENDPROC
ENDDEFINE


The only problem is that if you move the data, you'll need to recompile.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform