While !eof loop works with DBF but not with ADS

This forum is meant for questions and discussions about the X# language and tools
Post Reply
hilberg.it
Posts: 75
Joined: Sun Sep 20, 2020 7:25 am
Location: Germany

While !eof loop works with DBF but not with ADS

Post 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
IanB
Posts: 9
Joined: Tue Nov 01, 2016 8:12 pm
Location: UK

While !eof loop works with DBF but not with ADS

Post 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.
hilberg.it
Posts: 75
Joined: Sun Sep 20, 2020 7:25 am
Location: Germany

While !eof loop works with DBF but not with ADS

Post 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.
hilberg.it
Posts: 75
Joined: Sun Sep 20, 2020 7:25 am
Location: Germany

While !eof loop works with DBF but not with ADS

Post 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
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

While !eof loop works with DBF but not with ADS

Post 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
hilberg.it
Posts: 75
Joined: Sun Sep 20, 2020 7:25 am
Location: Germany

While !eof loop works with DBF but not with ADS

Post 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.
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

While !eof loop works with DBF but not with ADS

Post by ic2 »

Hello,

Great you found it!

Dick
Post Reply