xsharp.eu • AppenDB and RecNo()
Page 1 of 1

AppenDB and RecNo()

Posted: Mon Nov 09, 2020 5:18 pm
by Horst
Hello
odbServerNew:AppendDB (odbServer, , {|| _Field->RecNo() < nRecno})
This works on VO but produce a compiler error on X#
error XS0103: The name 'RecNo' does not exist in the current context 2870,49 Auftrag.prg HandAuftragContext:Auftrag_Ein_Change
i tried - FIELD->RecNo() - same like _Field and then _Field->RecNo or FIELD->RecNo or RecNo() - this compiles but doesnt work. The DB has one empty record.

Horst

AppenDB and RecNo()

Posted: Mon Nov 09, 2020 5:34 pm
by Chris
Hi Horst,

Indeed, I see VO allows this. But isn't this totally wrong? RecNo() is not a field, it is just a function call..

Please remove the "_field->" part and it should work as expected.

AppenDB and RecNo()

Posted: Mon Nov 09, 2020 5:42 pm
by Horst
Hi Chris
thanks for your quick answer. i wanna hit myself, i tried several solutions (also RecNo()) but i startet the wrong part of the app.
shame on me.
Horst

AppenDB and RecNo()

Posted: Mon Nov 09, 2020 5:43 pm
by Chris
Hehe, it happens to everyone :)