Problem Writing Memo File in X# and Reading it from VO

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

Problem Writing Memo File in X# and Reading it from VO

Post by hilberg.it »

Hi,
I have a strange problem, when I am writing to a FPT file in X# with RDDSETDEFAULT("DBFCDX"). I can read and write from it in X#. It works fine. But when I want to read from it in VO it states that the field is corrupted. I can fix the corruption by some prog that was suggested here, and it works again in VO.

Any ideas in which direction I could investigate? Could it be related to memoblock size or something like this?

As background information: I need the same database to be accessible from the ported X# app and from existing VO Apps. I hope this is possible.

Thank you very much already.
User avatar
Chris
Posts: 4913
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Problem Writing Memo File in X# and Reading it from VO

Post by Chris »

Yes, there should be no problem sharing the same dbf/cdx/fpt from both X# and VO apps. Can you please post
the files, together with a runnable sample for both VO and X# that shows the problem, so we can have a look?

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
hilberg.it
Posts: 75
Joined: Sun Sep 20, 2020 7:25 am
Location: Germany

Problem Writing Memo File in X# and Reading it from VO

Post by hilberg.it »

Hi Chris,
thanks for your help. Appreciate it. Great that this works in general!

I tried to extract the problem and build an Example App. But I couldn't reproduce the problem outside of my Business App.
In my app I noticed that the memo field gets filled with a very large empty string (255 characters). Adding an 'AllTrim' in X# solved the problem, that VO could not access the file anymore.
VO did not need an AllTrim and did not corrupt the field in that case. But I couldn't reproduce it in an App with that exact same String.

I thought that the length of the memo field might be exceeded?
Do you know where that is configured?

The Error Code was:
ERROR CODE: 32 [ CORRUPTION DETECTED ]
SUBSYSTEM: FLEXFILE
ERROR SUBCODE: 2006
OPERATION: Corruption detected in memo-file

Do you know what the code stands for?

Besides that I don't know why the issue occured. If I can reproduce it, I will tell you.

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

Problem Writing Memo File in X# and Reading it from VO

Post by Chris »

Hmmm, not sure what might have caused that in your main app. Robert has written those RDDs, let's see if he has an idea...
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
robert
Posts: 4522
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Problem Writing Memo File in X# and Reading it from VO

Post by robert »

Guys,

It would help if we could get the DBF/FPT that VO thinks are corrupt.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply