API 1 to API 2 conversion Memoryblock issue

The following code works in an API 1 version of a project, where the RS recordset, the Foto field contains a Blob;

var picMB as MemoryBlock

I’m now converting the project to API 2 using this code:

var picMB as MemoryBlock

and get the following error;

Parameter “Data” expects class MemoryBlock, but this is class Xojo.Core.MemoryBlock

in the FromData line.

Does the RS.Field(“Foto”).NativeValue line automatically create a MemoryBlock instead of a Xojo.Core.MemoryBlock?

Should I convert the MemoryBlock?

Try to set “Simple References” in the Inspector of “Shared Build Settings”.

That setting is no longer available and is considered off by default on Xojo 2020R2.1.
The process of converting a project from API1 to API2 is far from painless.

1 Like

I have the same problem with the last Xojo version ( 2021r1.1) and in this version there isn’t a Simple References settings.

How can i solve this problem?

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.