Unknow type: OleVariant

After upgrading to version 10.0.0.1589 when I try to generate the _intf.pas file I get the error “unknow type: OleVariant”. What’s happen? Both server and client are Delphi applications.

Are there some workaround to use the old behavior?

Hi,

Can you drop your .RODL to support@, pls?

We use the code first approach.
But it is no longer necessary. We decided to change all references from OleVariant to Binary.

It would still be interesting to see what broke this. Can you share the decoration of your code-first service that sued OleVariant?

Hi,

We don’t support OleVariant in CodeFirst.
I mean this type cannot be converted to RODL declaration properly.

I have more them 100 functions using this, i will get an example

This is an example that worked before the update.


[ROService(coServiceName)]
TSMFuncoesRecepcao = class(TRODataSnapModule)
...
[ROServiceMethod]
function fpuRetornaExamesPorDiaPaciente(ipData_Exame: TDate; ipNro_Ficha, ipNregistro_Interna: Integer): OleVariant;

in the client

ISMFuncoesRecepcao = interface(IROService)
  ['{4BA48BC6-DB5B-4BD3-9C4F-DA8934A632B2}']
    function fpuRetornaExamesPorDiaPaciente(const ipData_Exame: TDate; const ipNro_Ficha: Integer; const ipNregistro_Interna: Integer): OleVariant;

Thanx.

As I understand it/am told by the team, this is not supposed to work, and never was supposed to work, but it’s still worth checking what changed, and what this might have done, before the change.

We’ll have a look and see.

As I understand this is not a high propriety for you now and you want to migrate from OleVariant anyways, I’ll not consider this a showstopper issue, for now.

—marc

thats correct, already change all the functions to use binary.

Before the update i couldn’t use “Variant” as a return but i could use Olevariant.

I decided to move to binary because im using another clients beside delphi anyway (before i couldnt export those function to c# for example)

1 Like

Hi,

We support limited set of data types in CodeFirst services: Defining Code-First services (Delphi)

TDate and OleVariant aren’t supported.
It may compile but it won’t work correctly in runtime because our serializers know nothing about these 2 types and don’t support it

1 Like