xsharp.eu • While !eof loop works with DBF but not with ADS
Page 1 of 1

While !eof loop works with DBF but not with ADS

Posted: Tue Oct 19, 2021 8:28 pm
by hilberg.it
Hi,
I have another issue with moving from DBF to ADS with X#.
Does anyone have a clue, why this while loop works with DBF but with ADS?
It results in an infinity loop.

Code: Select all

LOCAL _oDbArtikel as bDBServer
_oDbArtikel = bDBServer{"<IP>:<PORT>ADSTestdArtikel"}

_oDbArtikel :GoTop()

do WHILE !_oDbArtikel :eof
   // do something like appending to an array...
ENDDO

While !eof loop works with DBF but not with ADS

Posted: Tue Oct 19, 2021 8:53 pm
by IanB
Not sure if its just your example, but a _oDbArtikel:Skip() would help a bit.

otherwise not sure why there would be a difference, works fine for me.

While !eof loop works with DBF but not with ADS

Posted: Tue Oct 19, 2021 9:00 pm
by hilberg.it
Thanks IanB,
skip is definitely missing in my posted example. I think I have to investigate further. Problem might be something else.

While !eof loop works with DBF but not with ADS

Posted: Wed Oct 20, 2021 11:08 am
by hilberg.it
So the loop is actually working as expected, but takes almost forever!!! The file has 4300 entries and looping through all of the entries takes a couple minutes!!!

Has anyone had issues with ADS (AXDBFCDX) being very slow? I have XSharp V 2.8.1.12 installed.

Thanks

While !eof loop works with DBF but not with ADS

Posted: Wed Oct 20, 2021 11:21 am
by ic2
Hello Hilberg.IT,

Could you post a small program which shows this slow looping?

I can test it against X# 2.7, later this week against 29, with or without ADS, and VO to compare.

We have several smaller X# projects "live", all ADS, but I am not sure if there's a larger DO..WHILE loop included.

Dick

While !eof loop works with DBF but not with ADS

Posted: Thu Oct 21, 2021 12:58 pm
by hilberg.it
Hi Dick,
thanks for your very kind offer! I was now able to locate the problem. It is caused by slow VPN connection.

While !eof loop works with DBF but not with ADS

Posted: Thu Oct 21, 2021 1:14 pm
by ic2
Hello,

Great you found it!

Dick