Help upgrading from 2.8.1.12 to 2.10.0.3

This forum is meant for questions and discussions about the X# language and tools
Post Reply
NickFriend
Posts: 248
Joined: Fri Oct 14, 2016 7:09 am

Help upgrading from 2.8.1.12 to 2.10.0.3

Post 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
VR
Posts: 102
Joined: Sun Aug 23, 2020 3:07 pm
Location: Italy

Help upgrading from 2.8.1.12 to 2.10.0.3

Post 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.
User avatar
Chris
Posts: 4913
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Help upgrading from 2.8.1.12 to 2.10.0.3

Post 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?

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
NickFriend
Posts: 248
Joined: Fri Oct 14, 2016 7:09 am

Help upgrading from 2.8.1.12 to 2.10.0.3

Post 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
NickFriend
Posts: 248
Joined: Fri Oct 14, 2016 7:09 am

Help upgrading from 2.8.1.12 to 2.10.0.3

Post 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.
Post Reply