xsharp.eu • Help upgrading from 2.8.1.12 to 2.10.0.3
Page 1 of 1

Help upgrading from 2.8.1.12 to 2.10.0.3

Posted: Thu Apr 14, 2022 4:34 pm
by NickFriend
Hi All,

I've just upgraded my installation of X#, but I'm now getting a new error. I'm referencing X# from a C# program, using it to import data from an old VO program.

The offending code is

Code: Select all

XSharp.Core.Functions.SetAnsi(false);
XSharp.Core.Functions.SetExclusive(false);
XSharp.Core.Functions.SetDateFormat("MM/DD/YY");
XSharp.Core.Functions.SetEpoch(1990);
XSharp.Core.Functions.SetDeleted(true);

int codepage = XSharp.RuntimeState.DosCodePage;
AdjustBinaryData.Initialize(Encoding.GetEncoding(codepage));

DbServer setupreader = new DbServer(Path.Combine(selectedpath, "Setup.dbf"), true, true, "DBFCDX");
...
XSharp.__Array buildstations = setupreader.FIELDGET("FIELD45");   << ERROR ON THIS LINE
FIELD45 is a memo field containing a VO array. This used to work fine, but I now get "Conversion Error from USUAL (OBJECT) to ARRAY".
I imagine something changed in memo field handling?

Any suggestions gratefully received.

Thanks

Nick

Help upgrading from 2.8.1.12 to 2.10.0.3

Posted: Thu Apr 14, 2022 6:06 pm
by VR
Hi...

can you assign the output of FieldGet to an variable of type usual and then check at runtime, if the result is really an array. I assume, that FieldGet returns a usual with a content, that is not compatible with an Array.

Help upgrading from 2.8.1.12 to 2.10.0.3

Posted: Sat Apr 16, 2022 12:28 am
by Chris
Hi Nick,

Have you checked if the problem exists only when using it from c#, or is it the same if you use it directly from an X# app, too?
In either case, can you prepare and post a (full) sample reproducing the problem?

.

Help upgrading from 2.8.1.12 to 2.10.0.3

Posted: Tue Apr 19, 2022 8:10 am
by NickFriend
Thanks for the replies... I was hoping someone would say "oh, that's because of x or y in V2.10"... to be honest I think the best is if I just roll back to 2.8. I'm so busy at the moment I can't get into investigating this in any depth.

Nick

Help upgrading from 2.8.1.12 to 2.10.0.3

Posted: Tue Apr 19, 2022 8:40 am
by NickFriend
Just an FYI.
I can confirm that simply rolling back to 2.8.1.12 fixes the issue.
The only files I'm using are XSharp.Core.dll, XSharp.Rdd.dll, XSharp.RT.dll, VORDDClasses.dll and VOSystemClasses.dll.

Nick

PS.. edited... and XSharp.MacroCompiler.dll.