Page 1 of 2
ReportPro (2) in ADS environment
Posted: Wed Apr 03, 2024 10:12 am
by ic2
After so many years of using ReportPro this sounds like a bit of an odd question. After posting this issue:
https://www.xsharp.eu/forum/topic/3958
the solution was to add every instantiation of a dbf in the array with swaps. This solved the problem that ReportPro asks for missing dbf's which aren't missing but gave kidsize stack errors. I checked some older newsgroup messages and now I wonder:
1 The reports use DBFCDX, the environment is ADS. This suggests that ReportPro doesn't use ADS. But how can this work? If I try to open a DBF, used by the ADS based program, with e.g. dbMax, it returns an error that this DBF is used exclusively elsewhere (which is ADS). I don't see anything explicitly in our code telling ReportPro that the dbf's are under ADS.
2 Do we actually need swaps? In my main program I only use it for some specific dbf's were a user specific copy exists.
Dick
Re: ReportPro (2) in ADS environment
Posted: Thu Apr 04, 2024 10:19 am
by Chris
Hi Dick,
Is that about the VO version of RP2 or the X# one? Or both? I must admit I have never used RP with ADS, but iwll give it a look.
Re: ReportPro (2) in ADS environment
Posted: Thu Apr 04, 2024 4:56 pm
by ic2
Hi Chris,
That would be great. For both. I have multiple reports but I do nothing as far as I can see to let it know the program uses ADS. But if ReportPro doesn't use ADS, why does it work at all in an ADS environment while dbMax would give that error trying to open a DBF.
Dick
Re: ReportPro (2) in ADS environment
Posted: Fri Apr 05, 2024 9:35 am
by Chris
Hi Dick,
I had the impression that you can specify additional RDDs (like the ADS ones) to report pro in the Rpwin.ini file (or another similar), but I can't find anything like that, so I think the only way is to use the arrays swaps at runtime, to tell RP that you want to use the servers you manually open (with the ADS driver) in your code.
Re: ReportPro (2) in ADS environment
Posted: Fri Apr 05, 2024 10:23 am
by ic2
Hello Chris,
That's right. I found a full array including ADSDBFCDX in the swap parameters, somewhere in the comp.lang newsgroup. But that still makes me wonder how it can function if a RDD is not defined (so effectively using DBFCDX) where e.g. dbMax would give an error thinking that the (ADS opened) DBF files are in exclusive use.
Knowing how this works may help us to solve some other issues.
Dick
Re: ReportPro (2) in ADS environment
Posted: Sat Apr 06, 2024 6:50 am
by Chris
Hi Dick,
In the swap array, you pass to report pro the dbserver objects that you have already opened in your app using the ADS drivers, so there's nothing for RP to do regarding opening them etc, it just uses them directly, without caring what RDD they use or what method you used to open them.
Re: ReportPro (2) in ADS environment
Posted: Mon Apr 08, 2024 9:56 am
by ic2
Hello Chris,
On it's own, that makes sense. But I only use swap arrays for some specific databases. That would mean ReportPro opens all the other dbf's using DBFCDX in a full ADS environment, right? Which still leaves the question: why can reportPro open these dbf's while dbMax gives an 'exclusive in use' ereror, doing the same?
Dick
Re: ReportPro (2) in ADS environment
Posted: Mon Apr 08, 2024 10:40 am
by Chris
Hi Dick,
Could it be RP (or dbMax) is opening the files from a different path?
Re: ReportPro (2) in ADS environment
Posted: Tue Apr 09, 2024 10:12 pm
by ic2
Hello Chris,
No, all the same path where ADS controls the DBF's, ReportPro has no problems opening these very same dbf's with DBFCDX and dbMax says they are in exclusive use.
Dick
Re: ReportPro (2) in ADS environment
Posted: Wed Apr 10, 2024 8:43 am
by Chris
Hi Dick,
Then maybe you can check with a file/process monitor windows utility which app has the files opened? Or maybe a system restart will clean this up.