Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursors and Reports?
Message
From
22/06/1999 10:05:26
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
16/06/1999 17:17:29
Jonathan Cochran
Alion Science and Technology
Maryland, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00230680
Message ID:
00232469
Views:
19
Here is the problem and solution:

One .EXE (Proj1.exe) calls another .EXE (DO Proj2.exe). After Proj2.exe is done, Proj1.exe calls another .EXE (DO Proj3.exe).

Proj2.exe and Proj3.exe both include the same class library. Proj2.exe creates and releases an instance of a class in the shared class library. When Proj3.exe creates an instance of the same class in the shared class library, the class that was loaded by Proj2.exe is used rather than using the class that is included in Proj3.exe. The real problem is that the instance of the class created by Proj3.exe is based on the class defined in Proj2.exe, and the instance thinks it is part of Proj2.exe. This means that the instance will look in Proj2.exe for any files it references, such as a report that was passed by name (as a string) to the class. Therefore, a report that is included in Proj3.exe is not found, since the class is looking in Proj2.exe for it.

These two projects (Proj2 and Proj3) look for the class library in the same folder (it sits at the same level as each project's folder). If a sub-folder is created under each of the projects' folders to store the class library, and each project looks in it's sub-folder for the class library, the problem goes away. The class library can then be shared between the two folders in SourceSafe to make sure they stay in sync.

Although this fixes our problem, does this make sense to anyone? If no one has a reasonable explanation for this, I'm going to report it to Microsoft.

I'm guessing that the development path must be referenced somehow in the .EXE, or while building the .EXE. When the path is the same, VFP assumes that it is the same class and uses the existing instance. When the path is different, VFP assumes that the classes are different and creates a new instance. ??


>Does anyone know of any problems in using a cursor as the source of a report? We've been intermittently getting a "File does not exist" error while running some our reports, and I've noticed that the reports that we are having trouble with are all based on cursors rather than tables.
>
>Thanks,
>Jonathan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform