Beim Öffnen einer DBF steht EOF auf .t.

Deutschsprachiges X#-Forum – German language forum

Moderator: wriedmann

Post Reply
lagraf
Posts: 417
Joined: Thu Jan 18, 2018 9:03 am

Beim Öffnen einer DBF steht EOF auf .t.

Post by lagraf »

Hallo,
was mir beim Umstellen einerVO App nach X# mit DBF/CDX aufgefallen ist:

Wenn ich eine DBF öffne, steht in VO der Satzzeiger auf dem ersten Satz und EOF ist .f.
Bei der gleichen App transportiert nach X# steht EOF auf .t.

Code: Select all

olServer := dbAgr{}
oDCAGRNR:FillUsing(olServer,#TXT,#AGRNR)
olServer:Close()
und ich muss manuell ein olServer:GoTop() einfügen.

Generiere ich das Fenster in X# neu, erstellt mir X# den Code im Constructor

Code: Select all

SELF:oDCAGRNR:FillUsing( dbAgr{} , #TXT , #AGRNR )
und ich muss den Code ausbessern oder bei allen dbServern nach dem Öffnen GoTop() einfügen.

Ist das ein Fehler im Transporter/X# Compiler?

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

Re: Beim Öffnen einer DBF steht EOF auf .t.

Post by Chris »

Hi Franz,

Can you please create and send a small but full sample reproducing the problem? Ideally a small VO mdi app (together with any needed dbf files) that works as expected that we can then export to X# and check the different behavior.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
lagraf
Posts: 417
Joined: Thu Jan 18, 2018 9:03 am

Re: Beim Öffnen einer DBF steht EOF auf .t.

Post by lagraf »

Hi Chris,
VO MDI Sample attached.
Franz
Attachments
TestEof.zip
(210.28 KiB) Downloaded 12 times
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Beim Öffnen einer DBF steht EOF auf .t.

Post by Chris »

Hi Franz,

Thanks, I see the problem, it's because of the SetIndex() you are using inside the constructor of the parent dbStandard class. We will check why this sets the eof to true (it's an incompatibility with VO), but for now you can easily solve the problem by using a SELF:GoTop(), just after the SELF:setIndex() call.

I also see the problem with the umlautes, will look into it and will get back to you!
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
lagraf
Posts: 417
Joined: Thu Jan 18, 2018 9:03 am

Re: Beim Öffnen einer DBF steht EOF auf .t.

Post by lagraf »

Hi Chris,
I already inserted the GoTop() so this incompatibility is no problem for me.
But I thought you might be interested in it.
Franz
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Beim Öffnen einer DBF steht EOF auf .t.

Post by Chris »

Hi Franz,

Yes of course, thanks for reporting it! But wanted to point out that there's no need to put the GoTop() in every window, doing it only once in the parent server class code would be enough.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
lagraf
Posts: 417
Joined: Thu Jan 18, 2018 9:03 am

Re: Beim Öffnen einer DBF steht EOF auf .t.

Post by lagraf »

That's exactly how I did it in dbStandard
Franz
Post Reply