Hello
I create a DBF and later i have this code
db:gotop()
do while ! db:eof
dbf:fieldget (xy) -> crash
the Prg crashed when the DBF has NO records.
I think, eof shoud be true when the dbf is empty or not ?
For now i fixed it with if db:reccount > 0
Horst
Empty DBF and EOF
Empty DBF and EOF
Hi Horst,
This should work fine, I also just created a small test and I do not get the error.
CAn you please send a small compilable sample showing this problem?
This should work fine, I also just created a small test and I do not get the error.
CAn you please send a small compilable sample showing this problem?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Empty DBF and EOF
Hi Chris
I was checking now the dbf. In VO, the dbcreate made dbf files i coud not open with dbAdmin. Size 611 calculated 610. Append on this files was allways no problem , thats why i did not care.
I moved my app in february to x# and it looks like this was a old tempfile created with CAVO.
So i hope this problem is solved in x#
Thanks Horst
I was checking now the dbf. In VO, the dbcreate made dbf files i coud not open with dbAdmin. Size 611 calculated 610. Append on this files was allways no problem , thats why i did not care.
I moved my app in february to x# and it looks like this was a old tempfile created with CAVO.
So i hope this problem is solved in x#
Thanks Horst
- Attachments
-
- Bin.zip
- (1.25 KiB) Downloaded 68 times
Empty DBF and EOF
Hi Horst,
I am sorry, I did not understand what you mean, can you please explain a bit more?
Do you mean there is still a problem, or is it fixed now? If you still get a problem, can you tell me exactly what I need to do, in order to reproduce it?
I am sorry, I did not understand what you mean, can you please explain a bit more?
Do you mean there is still a problem, or is it fixed now? If you still get a problem, can you tell me exactly what I need to do, in order to reproduce it?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Empty DBF and EOF
Hi Chris
I think , there is no problem in x#. Think x# creates the better files
Because i dont see strange empty dbf files like VO created it. The dbf file in the zip was created by VO.
I will observe it.
Thanks Horst
I think , there is no problem in x#. Think x# creates the better files
Because i dont see strange empty dbf files like VO created it. The dbf file in the zip was created by VO.
I will observe it.
Thanks Horst
Empty DBF and EOF
Hi Horst,
Ah, thanks, OK I understand now! I tried your code also in VO though, and it also creates the file correctly from what I see. Maybe the dbf you posted was not created by VO, but from another tool..
Ah, thanks, OK I understand now! I tried your code also in VO though, and it also creates the file correctly from what I see. Maybe the dbf you posted was not created by VO, but from another tool..
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Empty DBF and EOF
Hi Chris
Its from VO. Maybe its a bug in 2.7 . I did not upgrade to 2.8
Horst
Its from VO. Maybe its a bug in 2.7 . I did not upgrade to 2.8
Horst
Empty DBF and EOF
Hi Horst,
Oh you are right! I just tried with VO27 and indeed I get the same problem!
And it is very strange, because I also had not moved my own VO app to 2.8 and had never seen this problem before. Really strange..
Oh you are right! I just tried with VO27 and indeed I get the same problem!
And it is very strange, because I also had not moved my own VO app to 2.8 and had never seen this problem before. Really strange..
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Empty DBF and EOF
Hi Chris
I think normaly you will create a file and then you fill it 99.9999%. The append is working normal.
In my case, there is a situation i dont fill the dbf and then later on i try to read. Then booom.
Horst
I think normaly you will create a file and then you fill it 99.9999%. The append is working normal.
In my case, there is a situation i dont fill the dbf and then later on i try to read. Then booom.
Horst
Empty DBF and EOF
Hi Horst,
Ah indeed, after an Append it all works fine in VO 2.7 also.
Ah indeed, after an Append it all works fine in VO 2.7 also.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu