Another SCOPE problem

Xbase++ 2.0 Build 554 or later
Message
Author
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Another SCOPE problem

#11 Post by Cliff Wiernik »

With ADSDBE and using CDX, not NTX, I do not user db_setscope and dc_dbgotop. I have not noticed any issues between 1.0 and 2.0 but my 2.0 testing is limited. I have just added my win10 laptop into the mix and have not noticed any issues. I did notice an issue with ADT (with both 1.9 and 2.0) files (which we using along side our that with cdx files for replication to our website). The scope did not appear to work properly to find the records for deletion. If I did it the old fashioned way of seeking the top and then stepping through until eof or our of scope, our deletion process worked fine.

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Another SCOPE problem

#12 Post by bwolfsohn »

Cliff Wiernik wrote:With ADSDBE and using CDX, not NTX, I do not user db_setscope and dc_dbgotop. I have not noticed any issues between 1.0 and 2.0 but my 2.0 testing is limited. I have just added my win10 laptop into the mix and have not noticed any issues. I did notice an issue with ADT (with both 1.9 and 2.0) files (which we using along side our that with cdx files for replication to our website). The scope did not appear to work properly to find the records for deletion. If I did it the old fashioned way of seeking the top and then stepping through until eof or our of scope, our deletion process worked fine.
Cliff,

We've used it in a few places, with no problems in 1.9. (ads and cdx).

not sure where the issue is, but it looks like DC_ScopeAds setting may have changed default behavior. I've never set it or called it before..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Janko
Posts: 111
Joined: Sat Mar 20, 2010 8:36 am
Location: Cerklje

Re: Another SCOPE problem

#13 Post by Janko »

Dear All,

for years I had no problems with DC_SetScope in combination with ADS/xBase1.9. Recently I had to switch to xBase++ 2.0 and problem of scoping (or NOT scoping) appeared. I've just eliminated all DC_SetScope commands.

Lately I tried also with direct AX_SetScope, but again with NO Scoping or wrong scoping.

I wonder if someone find this combination workable: xBase 2.0, ADS and DC_setScope or direct AX_scoping?

Best regards
JAnko

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Another SCOPE problem

#14 Post by Cliff Wiernik »

We are not using Xbase 2.0 yet in production, but I do in development. Using ADS 11.10.00.24, ADS 11 win32 dlls.

We use dbsetscope all the time and have not had problems in my Xbase 2.0 testing.

I have had problems with 1.9 and 2.0 with dbsetscope. This is for a database we use as a replica of data for our website. When I was deleting a dealer, I would delete the children by using a scope and stepping through the child adt file and deleting the records. It did not work reliabily. I change to a seek of the top records and a do while !eof() .and. same record key and it has worked reliably. Don't know what the issue is. Will likely revisit this but this also occurred in 1.9 and 2.0.

What is weird is I have a utility program like xdot (but the Roger's xdot) and it was properly respecting the set scope.

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Another SCOPE problem

#15 Post by rdonnay »

use 1207.lot index 1207.loz alias lot exclusive
I can't get this to work.
Your zip file appears to be missing a memo file.
The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Another SCOPE problem

#16 Post by bwolfsohn »

just another stupid user trick...

here's one with the fpt.
Attachments
scopeproblem.zip
(105.04 KiB) Downloaded 874 times
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Another SCOPE problem

#17 Post by rdonnay »

Sorry, I forgot about this issue. Working on it now.
I can open the databases now.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Another SCOPE problem

#18 Post by rdonnay »

i can confirm there is a problem with dc_setscope in xbase 2.0.
I CANNOT confirm this.

I get exactly the same result with 1.9 and 2.0 ( eXpress++ 261 thru 264 )

DC_ScopeAds(.f.) always works
DC_ScopeAds(.t.) always fails

What I CAN confirm is that scoping works with DC_ScopeAds(.t.) however DC_KeyCount() reports incorrect results and browsing shows all records.

The problem is that AX_KeyCount() is failing. This is only called when DC_ScopeAds() is .TRUE.

I am working on this today.
The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Another SCOPE problem

#19 Post by bwolfsohn »

that would seem to make sense which explains why there have been numerous problems, but we couldn't pin down why...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Another SCOPE problem

#20 Post by rdonnay »

AX_KeyCount() is a wrapper function that uses an ADS API call named AdsKeyCount().

This is not working.
I don't know why.
I may have something to do with the fact that it is also a conditional index.
I have been on this for 2 hours already and am making no progress.

Well, I determined that the conditional index had no effect.

At this point, I am ready to give up on this.
I have a lot of customers who are using ADSDBE with eXpress++ and it is my recommendation that you always set DC_ScopeAds() to .FALSE. I am going to change this to the default.
The eXpress train is coming - and it has more cars.

Post Reply