Unknow type: OleVariant

After upgrading to version 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?


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?


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.

TSMFuncoesRecepcao = class(TRODataSnapModule)
function fpuRetornaExamesPorDiaPaciente(ipData_Exame: TDate; ipNro_Ficha, ipNregistro_Interna: Integer): OleVariant;

in the client

ISMFuncoesRecepcao = interface(IROService)
    function fpuRetornaExamesPorDiaPaciente(const ipData_Exame: TDate; const ipNro_Ficha: Integer; const ipNregistro_Interna: Integer): OleVariant;


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.


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


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