ReportPro (2) in ADS environment

This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
ic2
Posts: 1809
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

Hello Chris,

I can see it everywhere, including on my development Pc which is switched off daily. Also it's clear that AD opens the DBF files. Like this:

Situation 1: ADS has not opened DBF files (because the program using ADFS & these files has not started). Then I can open these files with dbMax
Situation 2: ADS opened DBF files (because the program using ADFS & these files has started). Then I can NOT open these files with dbMax while ReportPro opens them with DBFCDX.

Question remains: why can ReportPro open dbf files in use from ADS with DBFCDX and dbMax can not?

Dick
FFF
Posts: 1535
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Re: ReportPro (2) in ADS environment

Post by FFF »

Without any guarantees: I had a quick look, whether dbf header contains info about "locked" status. It seems, no. So, imho the filesystem handles this - and it might be, that ADS does not rely on this, but implements it's own way of locking, while cdx only looks for the answer, which windows gives.
Regards
Karl
(on Win8.1/64, Xide32 2.19, X#2.19.0.2.)
User avatar
Chris
Posts: 4593
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

Ah, just thought of it, they open fine from RP/any app that uses ADS, because the file opening is not really handled by RP, but by ADS itself. RP only tells ADS to open the files and ADS (which has already opened them itself) does the rest.

Edit: Basically, what Karl said just before me :)
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1809
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

Hello Karl, Chris,

Thanks for your replies. So ReportPro has a mechanism that hooks into the ADS file handling, which dbMax hasn't. Probably ReportPro is doing rougly the same as DBV, a dbv utility from Erik Visser and Janno Hordijk from which I have the sourcecode. It's using DBFAXSAdsIsServerLoaded to determine if ADS is indeed active when an "ADS open file" command is chosen and if so, it will use AXDBFCDX. If not active or a "DBFCDX open file" command is chosen, it will use AXDBFCDX. Further only the filtering code differs in ADS.

Dick
User avatar
Chris
Posts: 4593
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

It's not really that RPhooks into the ADS filesystem, you just open the files through the ADS RDD driver, which communicates with ADS and asks it to open the file and ADS does the rest internally.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1809
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

Hmm, I would say that would only happen if I define a swap array including AXDBFCDX. And I don't do that. So how does ReportPro know that it should use ADS?

Dick
User avatar
Chris
Posts: 4593
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: ReportPro (2) in ADS environment

Post by Chris »

Hi Dick,

If you look at the properties of the dbf in the section inside RP, what driver does it say that it uses? If that's indeed not using an ADS driver, then I can't think of any other explanations than the ones mentioned before..
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
ic2
Posts: 1809
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Re: ReportPro (2) in ADS environment

Post by ic2 »

That's DBFCDX, in the properties. And no other RDD is set when running the report from the VO program.

So that would mean that ReportPro doesn't use ADS and also that I still fail to understand why that works while dbMax fails to open a dbf in use by ads saying it is in exclusive use.

PS: Note that dbMax does have an option to open the dbf with DBF Driver CDX - FPT Memo (ADS) but when I do that I get

Can not open file ....dbf Unknown reason!

Anyhow, it remains a mystery; interesting that nobody (including myself) does actually know how it works.

Dick
User avatar
robert
Posts: 4280
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: ReportPro (2) in ADS environment

Post by robert »

DIck,
Anyhow, it remains a mystery; interesting that nobody (including myself) does actually know how it works.
I think I know how this works, but I did not look into your problem.
Did you ever include an example (report + code running the report +data files)?
To explain this I would have to run the example through the debugger.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply